python-engineio 4.15.0__py3-none-any.whl → 4.15.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- engineio/async_server.py +14 -2
- engineio/async_socket.py +2 -2
- engineio/server.py +14 -2
- engineio/socket.py +2 -2
- {python_engineio-4.15.0.dist-info → python_engineio-4.15.1.dist-info}/METADATA +1 -1
- {python_engineio-4.15.0.dist-info → python_engineio-4.15.1.dist-info}/RECORD +9 -9
- {python_engineio-4.15.0.dist-info → python_engineio-4.15.1.dist-info}/WHEEL +0 -0
- {python_engineio-4.15.0.dist-info → python_engineio-4.15.1.dist-info}/licenses/LICENSE +0 -0
- {python_engineio-4.15.0.dist-info → python_engineio-4.15.1.dist-info}/top_level.txt +0 -0
engineio/async_server.py
CHANGED
|
@@ -298,7 +298,13 @@ class AsyncServer(base_server.BaseServer):
|
|
|
298
298
|
self._log_error_once(f'{e} {sid}', 'bad-sid')
|
|
299
299
|
r = self._bad_request(f'{e} {sid}')
|
|
300
300
|
else:
|
|
301
|
-
if socket.
|
|
301
|
+
if not socket.connected:
|
|
302
|
+
# cannot accept requests before connecting
|
|
303
|
+
self._log_error_once(
|
|
304
|
+
f'Socket for session {sid} is not connected',
|
|
305
|
+
'not-connected')
|
|
306
|
+
r = self._bad_request('Not connected')
|
|
307
|
+
elif socket.upgraded:
|
|
302
308
|
# cannot accept HTTP requests once upgraded
|
|
303
309
|
self._log_error_once(
|
|
304
310
|
f'Unexpected HTTP request for session {sid}',
|
|
@@ -332,7 +338,13 @@ class AsyncServer(base_server.BaseServer):
|
|
|
332
338
|
r = self._bad_request(f'Invalid session {sid}')
|
|
333
339
|
else:
|
|
334
340
|
socket = self._get_socket(sid)
|
|
335
|
-
if not socket.
|
|
341
|
+
if not socket.connected:
|
|
342
|
+
# cannot accept requests before connecting
|
|
343
|
+
self._log_error_once(
|
|
344
|
+
f'Socket for session {sid} is not connected',
|
|
345
|
+
'not-connected')
|
|
346
|
+
r = self._bad_request('Not connected')
|
|
347
|
+
elif not socket.upgraded:
|
|
336
348
|
try:
|
|
337
349
|
await socket.handle_post_request(environ)
|
|
338
350
|
r = self._ok(jsonp_index=jsonp_index)
|
engineio/async_socket.py
CHANGED
|
@@ -56,8 +56,8 @@ class AsyncSocket(base_socket.BaseSocket):
|
|
|
56
56
|
"""Make sure the client is still sending pings."""
|
|
57
57
|
if self.closed:
|
|
58
58
|
raise exceptions.SocketIsClosedError()
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
last_ping = self.last_ping
|
|
60
|
+
if last_ping and time.time() - last_ping > self.server.ping_timeout:
|
|
61
61
|
self.server.logger.info('%s: Client is gone, closing socket',
|
|
62
62
|
self.sid)
|
|
63
63
|
# Passing abort=False here will cause close() to write a
|
engineio/server.py
CHANGED
|
@@ -276,7 +276,13 @@ class Server(base_server.BaseServer):
|
|
|
276
276
|
self._log_error_once(f'{e} {sid}', 'bad-sid')
|
|
277
277
|
r = self._bad_request(f'{e} {sid}')
|
|
278
278
|
else:
|
|
279
|
-
if socket.
|
|
279
|
+
if not socket.connected:
|
|
280
|
+
# cannot accept requests before connecting
|
|
281
|
+
self._log_error_once(
|
|
282
|
+
f'Socket for session {sid} is not connected',
|
|
283
|
+
'not-connected')
|
|
284
|
+
r = self._bad_request('Not connected')
|
|
285
|
+
elif socket.upgraded:
|
|
280
286
|
# cannot accept HTTP requests once upgraded
|
|
281
287
|
self._log_error_once(
|
|
282
288
|
f'Unexpected HTTP request for session {sid}',
|
|
@@ -310,7 +316,13 @@ class Server(base_server.BaseServer):
|
|
|
310
316
|
r = self._bad_request(f'Invalid session {sid}')
|
|
311
317
|
else:
|
|
312
318
|
socket = self._get_socket(sid)
|
|
313
|
-
if not socket.
|
|
319
|
+
if not socket.connected:
|
|
320
|
+
# cannot accept requests before connecting
|
|
321
|
+
self._log_error_once(
|
|
322
|
+
f'Socket for session {sid} is not connected',
|
|
323
|
+
'not-connected')
|
|
324
|
+
r = self._bad_request('Not connected')
|
|
325
|
+
elif not socket.upgraded:
|
|
314
326
|
try:
|
|
315
327
|
socket.handle_post_request(environ)
|
|
316
328
|
r = self._ok(jsonp_index=jsonp_index)
|
engineio/socket.py
CHANGED
|
@@ -57,8 +57,8 @@ class Socket(base_socket.BaseSocket):
|
|
|
57
57
|
"""Make sure the client is still responding to pings."""
|
|
58
58
|
if self.closed:
|
|
59
59
|
raise exceptions.SocketIsClosedError()
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
last_ping = self.last_ping
|
|
61
|
+
if last_ping and time.time() - last_ping > self.server.ping_timeout:
|
|
62
62
|
self.server.logger.info('%s: Client is gone, closing socket',
|
|
63
63
|
self.sid)
|
|
64
64
|
# Passing abort=False here will cause close() to write a
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
engineio/__init__.py,sha256=0R2PY1EXu3sicP7mkA0_QxEVGRlFlgvsxfhByqREE1A,481
|
|
2
2
|
engineio/async_client.py,sha256=QIeN6WREOpPOXGk_c4z0HFuUZ-krcb0VNRJdYn3TptE,30996
|
|
3
|
-
engineio/async_server.py,sha256=
|
|
4
|
-
engineio/async_socket.py,sha256=
|
|
3
|
+
engineio/async_server.py,sha256=j9nYtucVXquHvodl0GC_mws6E606JFuImEvtV7TbhEU,29008
|
|
4
|
+
engineio/async_socket.py,sha256=qZYv0BagtaxQvrKK3fwrI4cgf3ShtIRLKdjwxw43WdQ,10834
|
|
5
5
|
engineio/base_client.py,sha256=75L-ydpGSedVLph46aLiwpf8DNPhdgmbkXxH-nSso4E,6033
|
|
6
6
|
engineio/base_server.py,sha256=tTCqc65Vzf-0Be1uunt1FuGxPOvcpOUCxnT5V2mZCWo,14763
|
|
7
7
|
engineio/base_socket.py,sha256=PWiJC1msNo-0ctlP3JAwWsngKvnYM-ZjS6B6zzfu-eM,420
|
|
@@ -11,8 +11,8 @@ engineio/json.py,sha256=SG5FTojqd1ix6u0dKXJsZVqqdYioZLO4S2GPL7BKl3U,405
|
|
|
11
11
|
engineio/middleware.py,sha256=5NKBXz-ftuFErUB_V9IDvRHaSOsjhtW-NnuJtquB1nc,3750
|
|
12
12
|
engineio/packet.py,sha256=YO3gmeKUoKyIsUq2e1z7Zifr5PGeS3gnaCeqR7wj5hQ,3198
|
|
13
13
|
engineio/payload.py,sha256=GIWu0Vnay4WNZlDxHqVgP34tKTBXX58OArJ-mO5zD3E,1539
|
|
14
|
-
engineio/server.py,sha256=
|
|
15
|
-
engineio/socket.py,sha256=
|
|
14
|
+
engineio/server.py,sha256=hl7UrTFp6gJT-SCtvJMh9CdUSHr3RqNk5-Hav5sIDH8,24534
|
|
15
|
+
engineio/socket.py,sha256=1xCvZpaoqnud2HNJEs5FXOjOlycjNG5RtSgnHEv8yoE,10461
|
|
16
16
|
engineio/static_files.py,sha256=5h_SMrTbBITg9mYPswe2voA2u3tj9aXz_PuS4OLALj8,2112
|
|
17
17
|
engineio/async_drivers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
18
|
engineio/async_drivers/_websocket_wsgi.py,sha256=8kutiYG0syg3rFeqzMU3Pm-QQwaUx0F9EUUaOfKwPAU,1026
|
|
@@ -24,8 +24,8 @@ engineio/async_drivers/gevent_uwsgi.py,sha256=m6ay5dov9FDQl0fbeiKeE-Orh5LiF6zLlY
|
|
|
24
24
|
engineio/async_drivers/sanic.py,sha256=GYX8YWR1GbRm-GkMTAQkfkWbY12MOT1IV2DzH0Xx8Ns,4495
|
|
25
25
|
engineio/async_drivers/threading.py,sha256=ywmG59d4H6OHZjKarBN97-9BHEsRxFEz9YN-E9QAu_I,463
|
|
26
26
|
engineio/async_drivers/tornado.py,sha256=v9uuGk8_HS6DjhoEKXfjHpki1FnydN4wi7eyBMsUTJA,5908
|
|
27
|
-
python_engineio-4.15.
|
|
28
|
-
python_engineio-4.15.
|
|
29
|
-
python_engineio-4.15.
|
|
30
|
-
python_engineio-4.15.
|
|
31
|
-
python_engineio-4.15.
|
|
27
|
+
python_engineio-4.15.1.dist-info/licenses/LICENSE,sha256=yel9Pbwfu82094CLKCzWRtuIev9PUxP-a76NTDFAWpw,1082
|
|
28
|
+
python_engineio-4.15.1.dist-info/METADATA,sha256=OUrDPraYcxJjKEZ4L87sn22DnY2pqcSPHximPyUyQvo,2634
|
|
29
|
+
python_engineio-4.15.1.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
30
|
+
python_engineio-4.15.1.dist-info/top_level.txt,sha256=u8PmNisCZLwRYcWrNLe9wutQ2tt4zNi8IH362c-HWuA,9
|
|
31
|
+
python_engineio-4.15.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|