Added warnings about changing port settings in api and network.tcp
This commit is contained in:
parent
d2a896697d
commit
bbdbca253b
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user