From 1e29203b41ee5f1bbde17bf77a909183fc66033a Mon Sep 17 00:00:00 2001 From: Miguel Grinberg Date: Thu, 15 Apr 2021 00:10:44 +0100 Subject: [PATCH] Change pingTimeout to 20 seconds to match JavaScript's Socket.IO 4.x releases --- engineio/asyncio_server.py | 2 +- engineio/server.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engineio/asyncio_server.py b/engineio/asyncio_server.py index 6639f26b..934abf47 100644 --- a/engineio/asyncio_server.py +++ b/engineio/asyncio_server.py @@ -29,7 +29,7 @@ class AsyncServer(server.Server): is a grace period added by the server. :param ping_timeout: The time in seconds that the client waits for the server to respond before disconnecting. The default - is 5 seconds. + is 20 seconds. :param max_http_buffer_size: The maximum size of a message when using the polling transport. The default is 1,000,000 bytes. diff --git a/engineio/server.py b/engineio/server.py index 7498f3f6..de9d4aa6 100644 --- a/engineio/server.py +++ b/engineio/server.py @@ -36,7 +36,7 @@ class Server(object): is a grace period added by the server. :param ping_timeout: The time in seconds that the client waits for the server to respond before disconnecting. The default - is 5 seconds. + is 20 seconds. :param max_http_buffer_size: The maximum size of a message when using the polling transport. The default is 1,000,000 bytes. @@ -86,7 +86,7 @@ class Server(object): _default_monitor_clients = True sequence_number = 0 - def __init__(self, async_mode=None, ping_interval=25, ping_timeout=5, + def __init__(self, async_mode=None, ping_interval=25, ping_timeout=20, max_http_buffer_size=1000000, allow_upgrades=True, http_compression=True, compression_threshold=1024, cookie=None, cors_allowed_origins=None,