mirror of
https://github.com/emqx/neuron.git
synced 2026-10-29 15:09:11 +08:00
fix(connection): recv disconnect
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user