mirror of https://gitlab.com/litecord/litecord.git
gateway.websocket: add debug logging on chunked send
This commit is contained in:
parent
032942a466
commit
6a476dc9f7
|
|
@ -146,9 +146,13 @@ class GatewayWebsocket:
|
|||
async def _chunked_send(self, data: bytes, chunk_size: int):
|
||||
"""Split data in chunk_size-big chunks and send them
|
||||
over the websocket."""
|
||||
log.debug('zlib-stream: chunking {} bytes into {}-byte chunks',
|
||||
len(data), chunk_size)
|
||||
|
||||
total_chunks = 0
|
||||
for chunk in yield_chunks(data, chunk_size):
|
||||
total_chunks += 1
|
||||
log.debug('zlib-stream: chunk {}', total_chunks)
|
||||
await self.ws.send(chunk)
|
||||
|
||||
log.debug('zlib-stream: sent {} chunks', total_chunks)
|
||||
|
|
|
|||
Loading…
Reference in New Issue