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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meshsocket
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: Lightweight WebSocket mesh networking — broadcast, direct routing, and request/response over a simple JSON wire protocol.
5
5
  Author: Carter Beaudoin
6
6
  License-Expression: MIT
@@ -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.2.0"
10
+ __version__ = "0.3.0"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meshsocket
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: Lightweight WebSocket mesh networking — broadcast, direct routing, and request/response over a simple JSON wire protocol.
5
5
  Author: Carter Beaudoin
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "meshsocket"
7
- version = "0.2.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