sent_ping wasn't be used for some reason
This commit is contained in:
parent
bfdae87b36
commit
8495838541
1 changed files with 3 additions and 1 deletions
|
@ -274,7 +274,7 @@ class Server(IServer):
|
|||
|
||||
async def _read_lines(self):
|
||||
waiting_lines: List[Tuple[Line, Optional[Emit]]] = []
|
||||
sent_ping = True
|
||||
sent_ping = False
|
||||
while True:
|
||||
now = monotonic()
|
||||
timeouts: List[float] = []
|
||||
|
@ -298,9 +298,11 @@ class Server(IServer):
|
|||
if since >= (PING_TIMEOUT*2):
|
||||
raise ServerDisconnectedException()
|
||||
elif not sent_ping:
|
||||
sent_ping = True
|
||||
await self.send(build("PING", ["hello"]))
|
||||
continue
|
||||
else:
|
||||
sent_ping = False
|
||||
emit = self.parse_tokens(line)
|
||||
|
||||
waiting_lines.append((line, emit))
|
||||
|
|
Loading…
Reference in a new issue