Browse Source

Don't autobind to ipv6

pull/4942/head
Ruud 10 years ago
parent
commit
f65d6cb38d
  1. 6
      couchpotato/core/_base/_core.py
  2. 7
      couchpotato/runner.py

6
couchpotato/core/_base/_core.py

@ -230,6 +230,12 @@ config = [{
'description': 'The port I should listen to.',
},
{
'name': 'ipv6',
'default': 0,
'type': 'bool',
'description': 'Also bind the WebUI to ipv6 address',
},
{
'name': 'ssl_cert',
'description': 'Path to SSL server.crt',
'advanced': True,

7
couchpotato/runner.py

@ -333,9 +333,10 @@ def runCouchPotato(options, base_path, args, data_dir = None, log_dir = None, En
while try_restart:
try:
server.listen(config['port'], config['host'])
try: server.listen(config['port'], config['host6'])
except: log.info2('Tried to bind to IPV6 but failed')
if Env.setting('ipv6', default = False):
try: server.listen(config['port'], config['host6'])
except: log.info2('Tried to bind to IPV6 but failed')
loop.start()
server.close_all_connections()

Loading…
Cancel
Save