fix(connection): recv disconnect

This commit is contained in:
fengzero
2022-10-24 08:19:16 +00:00
parent 8d97d6b2e7
commit e5cfd7142c
+1 -1
View File
@@ -350,7 +350,7 @@ ssize_t neu_conn_recv(neu_conn_t *conn, uint8_t *buf, ssize_t len)
conn->fd, len, ret, strerror(errno), errno);
}
if (errno == EPIPE || ret <= 0) {
if (errno == EPIPE || ret == -1) {
conn_disconnect(conn);
}