mirror of
https://github.com/cesanta/mongoose.git
synced 2025-08-06 13:37:34 +08:00
Refactor NS_POLL case in mg_ev_handler
This commit is contained in:
parent
1389eec784
commit
6f66d794e8
16
mongoose.c
16
mongoose.c
@ -4945,15 +4945,17 @@ static void mg_ev_handler(struct ns_connection *nc, enum ns_event ev, void *p) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case NS_POLL:
|
case NS_POLL:
|
||||||
if (call_user(conn, MG_POLL) == MG_TRUE) {
|
if (conn != NULL) {
|
||||||
if (conn->ns_conn->flags & MG_HEADERS_SENT) {
|
if (call_user(conn, MG_POLL) == MG_TRUE) {
|
||||||
write_terminating_chunk(conn);
|
if (conn->ns_conn->flags & MG_HEADERS_SENT) {
|
||||||
|
write_terminating_chunk(conn);
|
||||||
|
}
|
||||||
|
close_local_endpoint(conn);
|
||||||
}
|
}
|
||||||
close_local_endpoint(conn);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (conn != NULL && conn->endpoint_type == EP_FILE) {
|
if (conn->endpoint_type == EP_FILE) {
|
||||||
transfer_file_data(conn);
|
transfer_file_data(conn);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Expire idle connections
|
// Expire idle connections
|
||||||
|
Loading…
Reference in New Issue
Block a user