BUG/MEDIUM: stream_interface: Don't report read0 if we were not connected.

In si_cs_recv(), report that arrive at the end of stream only if we were
indeed connected, we don't want that if the connection failed and we're about
to retry.
diff --git a/src/stream_interface.c b/src/stream_interface.c
index 81e1778..ae9a76f 100644
--- a/src/stream_interface.c
+++ b/src/stream_interface.c
@@ -1340,11 +1340,13 @@
 	return (cur_read != 0) || si_rx_blocked(si);
 
  out_shutdown_r:
-	/* we received a shutdown */
-	ic->flags |= CF_READ_NULL;
-	if (ic->flags & CF_AUTO_CLOSE)
-		channel_shutw_now(ic);
-	stream_sock_read0(si);
+	if (conn->flags & CO_FL_CONNECTED) {
+		/* we received a shutdown */
+		ic->flags |= CF_READ_NULL;
+		if (ic->flags & CF_AUTO_CLOSE)
+			channel_shutw_now(ic);
+		stream_sock_read0(si);
+	}
 	return 1;
 }