mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-13 21:52:37 +01:00
Socket: Clear buffers on reconnect
This commit is contained in:
parent
f518579c77
commit
add9306d30
@ -70,8 +70,6 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
|
|||||||
self._attempt = -1
|
self._attempt = -1
|
||||||
self.servers = ()
|
self.servers = ()
|
||||||
self.eagains = 0
|
self.eagains = 0
|
||||||
self.inbuffer = b''
|
|
||||||
self.outbuffer = ''
|
|
||||||
self.zombie = False
|
self.zombie = False
|
||||||
self.connected = False
|
self.connected = False
|
||||||
self.writeCheckTime = None
|
self.writeCheckTime = None
|
||||||
@ -248,6 +246,8 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
|
|||||||
|
|
||||||
def reconnect(self, wait=False, reset=True, server=None):
|
def reconnect(self, wait=False, reset=True, server=None):
|
||||||
self._attempt += 1
|
self._attempt += 1
|
||||||
|
self.inbuffer = b''
|
||||||
|
self.outbuffer = ''
|
||||||
self.nextReconnectTime = None
|
self.nextReconnectTime = None
|
||||||
if self.connected:
|
if self.connected:
|
||||||
self.onDisconnect()
|
self.onDisconnect()
|
||||||
|
Loading…
Reference in New Issue
Block a user