mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 12:43:09 +00:00
halfclose_read should call before force_close
This commit is contained in:
@@ -1752,13 +1752,9 @@ socket_server_poll(struct socket_server *ss, struct socket_message * result, int
|
|||||||
if (e->eof) {
|
if (e->eof) {
|
||||||
// For epoll (at least), FIN packets are exchanged both ways.
|
// For epoll (at least), FIN packets are exchanged both ways.
|
||||||
// See: https://stackoverflow.com/questions/52976152/tcp-when-is-epollhup-generated
|
// See: https://stackoverflow.com/questions/52976152/tcp-when-is-epollhup-generated
|
||||||
|
int r = halfclose_read(s) ? -1 : SOCKET_CLOSE;
|
||||||
force_close(ss, s, &l, result);
|
force_close(ss, s, &l, result);
|
||||||
if (halfclose_read(s)) {
|
return r;
|
||||||
// Already rasied SOCKET_CLOSE
|
|
||||||
return -1;
|
|
||||||
} else {
|
|
||||||
return SOCKET_CLOSE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user