Media chunk size fix

This commit is contained in:
Артём Вещев 2026-03-16 02:24:14 +03:00
parent 1433c2e881
commit 14a20eac26
1 changed files with 3 additions and 3 deletions

View File

@ -18,8 +18,8 @@ DEFAULT_PORT = 1080
log = logging.getLogger('tg-ws-proxy') log = logging.getLogger('tg-ws-proxy')
_TCP_NODELAY = True _TCP_NODELAY = True
_RECV_BUF = 131072 _RECV_BUF = 65536
_SEND_BUF = 131072 _SEND_BUF = 65536
_WS_POOL_SIZE = 4 _WS_POOL_SIZE = 4
_WS_POOL_MAX_AGE = 120.0 _WS_POOL_MAX_AGE = 120.0
@ -614,7 +614,7 @@ async def _bridge_ws(reader, writer, ws: RawWebSocket, label,
nonlocal up_bytes, up_packets nonlocal up_bytes, up_packets
try: try:
while True: while True:
chunk = await reader.read(131072) chunk = await reader.read(65536)
if not chunk: if not chunk:
break break
_stats.bytes_up += len(chunk) _stats.bytes_up += len(chunk)