mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-28 20:58:31 +00:00
Refactor NS_POLL case in mg_ev_handler
This commit is contained in:
1 parent
1389eec784
commit
6f66d794e8
1 file changed
+3
-1
+3
-1
@@ -4945,6 +4945,7 @@ static void mg_ev_handler(struct ns_connection *nc, enum ns_event ev, void *p) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case NS_POLL:
|
case NS_POLL:
|
||||||
|
if (conn != NULL) {
|
||||||
if (call_user(conn, MG_POLL) == MG_TRUE) {
|
if (call_user(conn, MG_POLL) == MG_TRUE) {
|
||||||
if (conn->ns_conn->flags & MG_HEADERS_SENT) {
|
if (conn->ns_conn->flags & MG_HEADERS_SENT) {
|
||||||
write_terminating_chunk(conn);
|
write_terminating_chunk(conn);
|
||||||
@@ -4952,9 +4953,10 @@ static void mg_ev_handler(struct ns_connection *nc, enum ns_event ev, void *p) {
|
|||||||
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
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user