diff --git a/lib/output.c b/lib/output.c
index 50ec69eab6e8aef1c5b384e6e683f05159ed7c1e..3dbe8bb17cf18d0fa6eda6f49a6cf89d40ae0a54 100644
--- a/lib/output.c
+++ b/lib/output.c
@@ -636,7 +636,7 @@ lws_ssl_capable_read_no_ssl(struct lws *wsi, unsigned char *buf, int len)
 	int n;
 
 	n = recv(wsi->sock, (char *)buf, len, 0);
-	if (n > 0) {
+	if (n >= 0) {
 		if (wsi->vhost)
 			wsi->vhost->rx += n;
 		return n;
@@ -647,7 +647,7 @@ lws_ssl_capable_read_no_ssl(struct lws *wsi, unsigned char *buf, int len)
 	    LWS_ERRNO == LWS_EINTR)
 		return LWS_SSL_CAPABLE_MORE_SERVICE;
 #endif
-	lwsl_debug("error on reading from skt\n");
+	lwsl_notice("error on reading from skt : %d\n", LWS_ERRNO);
 	return LWS_SSL_CAPABLE_ERROR;
 }