diff common-channel.c @ 278:e109fb08b8ee

merge of 4cbdd6e0a0d8c061075b9ed7609a06c4547f67d3 and 5d396842815593611f0d61762440145d1fc74d5a
author Matt Johnston <matt@ucc.asn.au>
date Wed, 08 Mar 2006 12:53:09 +0000
parents 3cea9d789cca 92b9b182c615
children baea1d43e7eb
line wrap: on
line diff
--- a/common-channel.c	Wed Mar 08 12:09:02 2006 +0000
+++ b/common-channel.c	Wed Mar 08 12:53:09 2006 +0000
@@ -376,7 +376,7 @@
 	cbuf_incrread(cbuf, len);
 	channel->recvdonelen += len;
 
-	if (fd == channel->writefd && len == maxlen && channel->recveof) { 
+	if (fd == channel->writefd && cbuf_getused(cbuf) == 0 && channel->recveof) { 
 		/* Check if we're closing up */
 		closewritefd(channel);
 		TRACE(("leave writechannel: recveof set"))