Fix bug: not destroy connection when peer closed
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>main
parent
6e58dab2b8
commit
589df6a85b
|
@ -118,10 +118,12 @@ no_ssl:
|
||||||
if (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK)
|
if (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (ret != 0) {
|
if (ret != 0)
|
||||||
con->flags |= UH_CON_CLOSE;
|
|
||||||
uh_log_err("read");
|
uh_log_err("read");
|
||||||
}
|
else
|
||||||
|
uh_log_debug("peer closed");
|
||||||
|
|
||||||
|
con->flags |= UH_CON_CLOSE;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue