kentpeacock / rpms / openssh

Forked from rpms/openssh 2 years ago
Clone
f09e2e
diff -up openssh-5.6p1/channels.c.exit-deadlock openssh-5.6p1/channels.c
f09e2e
--- openssh-5.6p1/channels.c.exit-deadlock	2010-08-05 15:09:48.000000000 +0200
f09e2e
+++ openssh-5.6p1/channels.c	2010-08-23 12:41:43.000000000 +0200
f09e2e
@@ -1647,6 +1647,10 @@ channel_handle_wfd(Channel *c, fd_set *r
f09e2e
 	u_int dlen, olen = 0;
f09e2e
 	int len;
f09e2e
 
f09e2e
+	if(c->wfd != -1 && buffer_len(&c->output) > 0 && c->ostate == CHAN_OUTPUT_WAIT_DRAIN) {
f09e2e
+		debug("channel %d: forcing write", c->self);
f09e2e
+		FD_SET(c->wfd, writeset);
f09e2e
+	}
f09e2e
 	/* Send buffered output data to the socket. */
f09e2e
 	if (c->wfd != -1 &&
f09e2e
 	    FD_ISSET(c->wfd, writeset) &&