IRCServer should handle ping_sent, not IRCSocket
This commit is contained in:
parent
a8d9365442
commit
b37a50ed7a
2 changed files with 5 additions and 2 deletions
|
@ -230,7 +230,11 @@ class Server(IRCObject.Object):
|
||||||
return self.until_read_timeout == 0
|
return self.until_read_timeout == 0
|
||||||
|
|
||||||
def read(self) -> typing.Optional[typing.List[str]]:
|
def read(self) -> typing.Optional[typing.List[str]]:
|
||||||
return self.socket.read()
|
lines = self.socket.read()
|
||||||
|
if lines:
|
||||||
|
self.ping_sent = False
|
||||||
|
return lines
|
||||||
|
|
||||||
def send(self, line: str):
|
def send(self, line: str):
|
||||||
results = self.events.on("preprocess.send").call_unsafe(
|
results = self.events.on("preprocess.send").call_unsafe(
|
||||||
server=self, line=line)
|
server=self, line=line)
|
||||||
|
|
|
@ -115,7 +115,6 @@ class Socket(IRCObject.Object):
|
||||||
decoded_lines.append(decoded_line)
|
decoded_lines.append(decoded_line)
|
||||||
|
|
||||||
self.last_read = time.monotonic()
|
self.last_read = time.monotonic()
|
||||||
self.ping_sent = False
|
|
||||||
return decoded_lines
|
return decoded_lines
|
||||||
|
|
||||||
def send(self, line: IRCLine.Line):
|
def send(self, line: IRCLine.Line):
|
||||||
|
|
Loading…
Reference in a new issue