From 36187093ea0b2d2240c043417b8949611687e105 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Mon, 10 Jun 2013 13:07:11 +1000 Subject: - dtucker@cvs.openbsd.org 2013/06/07 15:37:52 [channels.c channels.h clientloop.c] Add an "ABANDONED" channel state and use for mux sessions that are disconnected via the ~. escape sequence. Channels in this state will be able to close if the server responds, but do not count as active channels. This means that if you ~. all of the mux clients when using ControlPersist on a broken network, the backgrounded mux master will exit when the Control Persist time expires rather than hanging around indefinitely. bz#1917, also reported and tested by tedu@. ok djm@ markus@. --- clientloop.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'clientloop.c') diff --git a/clientloop.c b/clientloop.c index 6a2963583..7c1f8abba 100644 --- a/clientloop.c +++ b/clientloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.252 2013/06/02 23:36:29 dtucker Exp $ */ +/* $OpenBSD: clientloop.c,v 1.253 2013/06/07 15:37:52 dtucker Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -1111,6 +1111,9 @@ process_escapes(Channel *c, Buffer *bin, Buffer *bout, Buffer *berr, chan_write_failed(c); if (c->detach_user) c->detach_user(c->self, NULL); + c->type = SSH_CHANNEL_ABANDONED; + buffer_clear(&c->input); + chan_ibuf_empty(c); return 0; } else quit_pending = 1; -- cgit v1.2.3