fa14815
--- openssh-4.0p1/channels.c.exit-deadlock	2005-03-01 11:24:33.000000000 +0100
fa14815
+++ openssh-4.0p1/channels.c	2005-04-05 22:25:15.197226237 +0200
fa14815
@@ -1403,6 +1403,10 @@
fa14815
 	u_int dlen;
fa14815
 	int len;
fa14815
 
fa14815
+	if(c->wfd != -1 && buffer_len(&c->output) > 0 && c->ostate == CHAN_OUTPUT_WAIT_DRAIN) {
fa14815
+		debug("channel %d: forcing write", c->self);
fa14815
+		FD_SET(c->wfd, writeset);
fa14815
+	}
fa14815
 	/* Send buffered output data to the socket. */
fa14815
 	if (c->wfd != -1 &&
fa14815
 	    FD_ISSET(c->wfd, writeset) &&