mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-06 08:28:39 +00:00
Log errors for invalid interface values
This commit is contained in:
parent
05792809b5
commit
68b893fa02
2 changed files with 7 additions and 6 deletions
|
@ -126,9 +126,12 @@ class Core(component.Component):
|
||||||
# If there was an interface value from the command line, use it, but
|
# If there was an interface value from the command line, use it, but
|
||||||
# store the one in the config so we can restore it on shutdown
|
# store the one in the config so we can restore it on shutdown
|
||||||
self.__old_interface = None
|
self.__old_interface = None
|
||||||
if listen_interface and deluge.common.is_ip(listen_interface):
|
if listen_interface:
|
||||||
|
if deluge.common.is_ip(listen_interface):
|
||||||
self.__old_interface = self.config["listen_interface"]
|
self.__old_interface = self.config["listen_interface"]
|
||||||
self.config["listen_interface"] = listen_interface
|
self.config["listen_interface"] = listen_interface
|
||||||
|
else:
|
||||||
|
log.error("Invalid listen interface (must be IP Address): %s", listen_interface)
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
"""Starts the core"""
|
"""Starts the core"""
|
||||||
|
|
|
@ -98,9 +98,6 @@ class Daemon(object):
|
||||||
return 1
|
return 1
|
||||||
SetConsoleCtrlHandler(win_handler)
|
SetConsoleCtrlHandler(win_handler)
|
||||||
|
|
||||||
if listen_interface and not is_ip(listen_interface):
|
|
||||||
listen_interface = None
|
|
||||||
|
|
||||||
# Start the core as a thread and join it until it's done
|
# Start the core as a thread and join it until it's done
|
||||||
self.core = Core(listen_interface=listen_interface)
|
self.core = Core(listen_interface=listen_interface)
|
||||||
|
|
||||||
|
@ -108,6 +105,7 @@ class Daemon(object):
|
||||||
port = self.core.config["daemon_port"]
|
port = self.core.config["daemon_port"]
|
||||||
|
|
||||||
if interface and not is_ip(interface):
|
if interface and not is_ip(interface):
|
||||||
|
log.error("Invalid UI interface (must be IP Address): %s", interface)
|
||||||
interface = None
|
interface = None
|
||||||
|
|
||||||
self.rpcserver = RPCServer(
|
self.rpcserver = RPCServer(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue