diff -r 69cb561cc4c4 -r bba91f5fbe1c common-channel.c
--- a/common-channel.c	Sat Jul 13 11:53:24 2013 +0300
+++ b/common-channel.c	Wed Jul 17 22:19:18 2013 +0300
@@ -336,6 +336,7 @@
 
 	/* And if we can't receive any more data from them either, close up */
 	if (channel->readfd == FD_CLOSED
+			&& channel->writefd == FD_CLOSED
 			&& (ERRFD_IS_WRITE(channel) || channel->errfd == FD_CLOSED)
 			&& !channel->sent_close
 			&& close_allowed
