mirror of https://github.com/D4-project/d4-core
chg: [server] timeout unvalid connections
parent
5d923a39e2
commit
9144cd8af1
|
@ -120,6 +120,11 @@ class D4_Server(Protocol, TimeoutMixin):
|
||||||
self.process_header(data, self.ip, self.source_port)
|
self.process_header(data, self.ip, self.source_port)
|
||||||
|
|
||||||
def timeoutConnection(self):
|
def timeoutConnection(self):
|
||||||
|
if self.uuid is None:
|
||||||
|
# # TODO: ban auto
|
||||||
|
logger.warning('Timeout, no D4 header send, session_uuid={}, connection closed'.format(self.session_uuid))
|
||||||
|
self.transport.abortConnection()
|
||||||
|
else:
|
||||||
self.resetTimeout()
|
self.resetTimeout()
|
||||||
self.buffer = b''
|
self.buffer = b''
|
||||||
logger.debug('buffer timeout, session_uuid={}'.format(self.session_uuid))
|
logger.debug('buffer timeout, session_uuid={}'.format(self.session_uuid))
|
||||||
|
|
Loading…
Reference in New Issue