mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-24 19:19:00 +08:00
Calling long running connections regardless of select() status
This commit is contained in:
parent
22aea8acac
commit
82ad9a073a
@ -3739,11 +3739,6 @@ unsigned int mg_poll_server(struct mg_server *server, int milliseconds) {
|
||||
conn->last_activity_time = current_time;
|
||||
write_to_client(conn);
|
||||
}
|
||||
|
||||
if (conn->flags & CONN_LONG_RUNNING) {
|
||||
conn->mg_conn.wsbits = conn->flags & CONN_CLOSE ? 1 : 0;
|
||||
call_uri_handler(conn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3753,6 +3748,10 @@ unsigned int mg_poll_server(struct mg_server *server, int milliseconds) {
|
||||
if (conn->mg_conn.is_websocket) {
|
||||
ping_idle_websocket_connection(conn, current_time);
|
||||
}
|
||||
if (conn->flags & CONN_LONG_RUNNING) {
|
||||
conn->mg_conn.wsbits = conn->flags & CONN_CLOSE ? 1 : 0;
|
||||
call_uri_handler(conn);
|
||||
}
|
||||
if (conn->flags & CONN_CLOSE || conn->last_activity_time < expire_time) {
|
||||
close_conn(conn);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user