diff --git a/src/api.py b/src/api.py index b7f5c62d..f9d0a518 100644 --- a/src/api.py +++ b/src/api.py @@ -95,6 +95,8 @@ class singleAPI(StoppableThread): for attempt in range(50): try: if attempt > 0: + logger.warning( + 'Failed to start API listener on port %s', port) port = random.randint(32767, 65535) se = StoppableXMLRPCServer( (BMConfigParser().get( @@ -106,8 +108,9 @@ class singleAPI(StoppableThread): continue else: if attempt > 0: + logger.warning('Setting apiport to %s', port) BMConfigParser().set( - "bitmessagesettings", "apiport", str(port)) + 'bitmessagesettings', 'apiport', str(port)) BMConfigParser().save() break se.register_introspection_functions() diff --git a/src/network/tcp.py b/src/network/tcp.py index 368ca5e0..a1691ceb 100644 --- a/src/network/tcp.py +++ b/src/network/tcp.py @@ -371,6 +371,7 @@ class TCPServer(AdvancedDispatcher): for attempt in range(50): try: if attempt > 0: + logger.warning('Failed to bind on port %s', port) port = random.randint(32767, 65535) self.bind((host, port)) except socket.error as e: @@ -378,6 +379,7 @@ class TCPServer(AdvancedDispatcher): continue else: if attempt > 0: + logger.warning('Setting port to %s', port) BMConfigParser().set( 'bitmessagesettings', 'port', str(port)) BMConfigParser().save()