mirror of
https://github.com/emqx/neuron.git
synced 2026-10-26 03:40:01 +08:00
fix(connection): recv errorno check
This commit is contained in:
@@ -403,7 +403,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 == -1 || ret == 0) {
|
||||
if (errno == EPIPE || ret == -1 || (ret == 0 && errno != 0)) {
|
||||
conn_disconnect(conn);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user