Kaynağa Gözat

- minor: nicer error handling

Andrei Pelinescu-Onciul 18 yıl önce
ebeveyn
işleme
301fa31498
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      tcp_read.c

+ 2 - 2
tcp_read.c

@@ -856,11 +856,11 @@ again:
 			}
 			if (n==0){
 				LOG(L_ERR, "WARNING: tcp_receive: handle_io: 0 bytes read\n");
-				break;
+				goto error;
 			}
 			if (con==0){
 					LOG(L_CRIT, "BUG: tcp_receive: handle_io null pointer\n");
-					break;
+					goto error;
 			}
 			con->fd=s;
 			if (s==-1) {