From 9d38418817d1894b31c93ece0113e503d82167cd Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Sun, 11 Oct 2026 15:42:52 +0200 Subject: feat(node): log what a transfer moved when it ends One INFO line per lease: bytes, duration, rate, and the SCTP association's window, round trip, losses and T3 expirations. Co-Authored-By: Claude Opus 5.5 --- .../meshbay-node/src/meshbay_node/transport/webrtc/upload_handlers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'packages/meshbay-node/src/meshbay_node/transport/webrtc/upload_handlers.py') diff --git a/packages/meshbay-node/src/meshbay_node/transport/webrtc/upload_handlers.py b/packages/meshbay-node/src/meshbay_node/transport/webrtc/upload_handlers.py index b19846c..c052703 100644 --- a/packages/meshbay-node/src/meshbay_node/transport/webrtc/upload_handlers.py +++ b/packages/meshbay-node/src/meshbay_node/transport/webrtc/upload_handlers.py @@ -18,7 +18,7 @@ from meshbay_node.roots import ( shell_active, ) from meshbay_node.transport.webrtc.disk import _append_chunk, _free_bytes -from meshbay_node.transport.webrtc.limits import LEASE_NONE, LEASE_QUEUED +from meshbay_node.transport.webrtc.limits import LEASE_GRANTED, LEASE_NONE, LEASE_QUEUED log = logging.getLogger("meshbay_node.transport.webrtc_server") @@ -227,6 +227,8 @@ class UploadMixin: _refuse("Invalid chunk encoding", "bad_chunk_encoding") return chunk_bytes = bytes(data) + if tr and state == LEASE_GRANTED: + self._account(tr, len(chunk_bytes)) if not SAFE_UPLOAD_NAME.match(filename): _refuse("Invalid filename", "invalid_filename") -- cgit v1.2.3