Fix a mistake in Listener.run()

This commit is contained in:
Lee Miller 2022-09-23 08:44:55 +03:00
parent 5462e990dc
commit d145143e4b
Signed by untrusted user: lee.miller
GPG Key ID: 4F97A5EA88F4AB63
1 changed files with 2 additions and 2 deletions

View File

@ -26,12 +26,12 @@ class Listener(threading.Thread):
break
try:
conn, addr = self.s.accept()
logging.info('Incoming connection from: %s:%i', *addr)
logging.info('Incoming connection from: %s:%i', *addr[:2])
with shared.connections_lock:
if len(shared.connections) > shared.connection_limit:
conn.close()
else:
c = Connection(*addr, conn, server=True)
c = Connection(*addr[:2], conn, server=True)
c.start()
shared.connections.add(c)
except socket.timeout: