From 2326cf3de8e1c399369611b301451bb2504a213e Mon Sep 17 00:00:00 2001 From: shortcutme Date: Mon, 15 Apr 2019 15:47:05 +0200 Subject: [PATCH] Ignore incoming connections in offline mode --- src/Connection/ConnectionServer.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Connection/ConnectionServer.py b/src/Connection/ConnectionServer.py index 23fa3261..8c76c192 100644 --- a/src/Connection/ConnectionServer.py +++ b/src/Connection/ConnectionServer.py @@ -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