mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-20 11:19:56 +00:00
Ping only websocket connections
This commit is contained in:
1 parent
15a2639355
commit
4cd11de400
1 file changed
+3
-1
+3
-1
@@ -3467,7 +3467,9 @@ unsigned int mg_poll_server(struct mg_server *server, int milliseconds) {
|
||||
// Close expired connections and those that need to be closed
|
||||
LINKED_LIST_FOREACH(&server->active_connections, lp, tmp) {
|
||||
conn = LINKED_LIST_ENTRY(lp, struct connection, link);
|
||||
ping_idle_websocket_connection(conn, current_time);
|
||||
if (conn->mg_conn.is_websocket) {
|
||||
ping_idle_websocket_connection(conn, current_time);
|
||||
}
|
||||
if (conn->flags & CONN_CLOSE || conn->last_activity_time < expire_time) {
|
||||
close_conn(conn);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user