meshsocket 0.2.0__tar.gz → 0.3.0__tar.gz
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.
- {meshsocket-0.2.0 → meshsocket-0.3.0}/PKG-INFO +1 -1
- {meshsocket-0.2.0 → meshsocket-0.3.0}/meshsocket/__init__.py +1 -1
- {meshsocket-0.2.0 → meshsocket-0.3.0}/meshsocket.egg-info/PKG-INFO +1 -1
- {meshsocket-0.2.0 → meshsocket-0.3.0}/pyproject.toml +1 -1
- {meshsocket-0.2.0 → meshsocket-0.3.0}/socketCore.py +5 -2
- {meshsocket-0.2.0 → meshsocket-0.3.0}/LICENSE +0 -0
- {meshsocket-0.2.0 → meshsocket-0.3.0}/README.md +0 -0
- {meshsocket-0.2.0 → meshsocket-0.3.0}/meshsocket.egg-info/SOURCES.txt +0 -0
- {meshsocket-0.2.0 → meshsocket-0.3.0}/meshsocket.egg-info/dependency_links.txt +0 -0
- {meshsocket-0.2.0 → meshsocket-0.3.0}/meshsocket.egg-info/requires.txt +0 -0
- {meshsocket-0.2.0 → meshsocket-0.3.0}/meshsocket.egg-info/top_level.txt +0 -0
- {meshsocket-0.2.0 → meshsocket-0.3.0}/setup.cfg +0 -0
- {meshsocket-0.2.0 → meshsocket-0.3.0}/socket_server.py +0 -0
|
@@ -7,4 +7,4 @@ so existing code keeps running while it migrates to the package name.
|
|
|
7
7
|
from socketCore import MeshSocket, LogColors, sanitize_identity, valid_ident, IDENT_RE, NAMESPACED_RE
|
|
8
8
|
|
|
9
9
|
__all__ = ["MeshSocket", "LogColors", "sanitize_identity", "valid_ident", "IDENT_RE", "NAMESPACED_RE"]
|
|
10
|
-
__version__ = "0.
|
|
10
|
+
__version__ = "0.3.0"
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "meshsocket"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.3.0"
|
|
8
8
|
description = "Lightweight WebSocket mesh networking — broadcast, direct routing, and request/response over a simple JSON wire protocol."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -532,7 +532,7 @@ class MeshSocket:
|
|
|
532
532
|
client itself produced). Anything else was not written by us."""
|
|
533
533
|
try:
|
|
534
534
|
frame = json.loads(line)
|
|
535
|
-
except (ValueError, TypeError):
|
|
535
|
+
except (ValueError, TypeError, RecursionError):
|
|
536
536
|
return False
|
|
537
537
|
return (isinstance(frame, dict) and isinstance(frame.get("type"), str)
|
|
538
538
|
and isinstance(frame.get("id"), str)
|
|
@@ -620,7 +620,10 @@ class MeshSocket:
|
|
|
620
620
|
|
|
621
621
|
try:
|
|
622
622
|
data = json.loads(message)
|
|
623
|
-
except (json.JSONDecodeError, TypeError, ValueError):
|
|
623
|
+
except (json.JSONDecodeError, TypeError, ValueError, RecursionError):
|
|
624
|
+
# RecursionError: a frame nested deeper than the parser's C
|
|
625
|
+
# recursion limit. Drop it like any bad frame instead of letting
|
|
626
|
+
# it escape and tear the connection down (peer-forced reconnects).
|
|
624
627
|
continue
|
|
625
628
|
await inflight.acquire()
|
|
626
629
|
asyncio.create_task(run(data))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|