Ignore incoming connections in offline mode
This commit is contained in:
parent
b8879853d5
commit
2326cf3de8
1 changed files with 4 additions and 0 deletions
|
@ -119,6 +119,10 @@ class ConnectionServer(object):
|
|||
connection.close("Close all connections")
|
||||
|
||||
def handleIncomingConnection(self, sock, addr):
|
||||
if config.offline:
|
||||
sock.close()
|
||||
return False
|
||||
|
||||
ip, port = addr[0:2]
|
||||
ip = ip.lower()
|
||||
if ip.startswith("::ffff:"): # IPv6 to IPv4 mapping
|
||||
|
|
Loading…
Reference in a new issue