diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-10-11 15:42:52 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-10-11 15:43:06 +0200 |
| commit | 9d38418817d1894b31c93ece0113e503d82167cd (patch) | |
| tree | adf4c8126c90d60f6a16724d14eafb80f33d5289 /packages/meshbay-node/src/meshbay_node/transport/webrtc/upload_handlers.py | |
| parent | b39e73cbb279ab0274e8cd0b84304a602fe1d5ef (diff) | |
| download | meshbay-9d38418817d1894b31c93ece0113e503d82167cd.tar.gz | |
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 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-node/src/meshbay_node/transport/webrtc/upload_handlers.py')
| -rw-r--r-- | packages/meshbay-node/src/meshbay_node/transport/webrtc/upload_handlers.py | 4 |
1 files changed, 3 insertions, 1 deletions
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") |