소스 검색

Fix disconnects when there is a large send queue

The message delivery confirmation didn't send the PING immediately, so the remaining send queue blocked it, which would then cause the confirmation to fail, all messages to be requeued, and the connection to be closed.
master
JustAnotherArchivist 1 년 전
부모
커밋
577e10c80b
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. +1
    -1
      http2irc.py

+ 1
- 1
http2irc.py 파일 보기

@@ -586,7 +586,7 @@ class IRCClientProtocol(asyncio.Protocol):
continue
self.logger.debug('Trying to confirm message delivery')
self.pongReceivedEvent.clear()
self.send(b'PING :42')
self._direct_send(b'PING :42')
await wait_cancel_pending({asyncio.create_task(self.pongReceivedEvent.wait())}, return_when = asyncio.FIRST_COMPLETED, timeout = 5)
self.logger.debug(f'Message delivery successful: {self.pongReceivedEvent.is_set()}')
if not self.pongReceivedEvent.is_set():


불러오는 중...
취소
저장