Commit 6f66d794 authored by Sergey Lyubka's avatar Sergey Lyubka

Refactor NS_POLL case in mg_ev_handler

parent 1389eec7
...@@ -4945,6 +4945,7 @@ static void mg_ev_handler(struct ns_connection *nc, enum ns_event ev, void *p) { ...@@ -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) { ...@@ -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
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment