From 809b11c2f3e02b0ec460d495c4b9cf4fd75ca12c Mon Sep 17 00:00:00 2001 From: Safihre Date: Mon, 10 Oct 2016 15:56:40 +0200 Subject: [PATCH] Only allow binding to IPv6 when ipv6_hosting enabled For some reason it was always binding to IPv6, even when disabled (on Windows) --- SABnzbd.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SABnzbd.py b/SABnzbd.py index bb29a2b..01f866c 100755 --- a/SABnzbd.py +++ b/SABnzbd.py @@ -533,7 +533,8 @@ def all_localhosts(): ips = [] for item in info: item = item[4][0] - if item not in ips: + # Only return IPv6 when enabled + if item not in ips and ('::1' not in item or sabnzbd.cfg.ipv6_hosting()): ips.append(item) return ips @@ -1400,7 +1401,7 @@ def main(): hosts[1] = '::1' # The Windows binary requires numeric localhost as primary address - if multilocal and cherryhost == 'localhost': + if cherryhost == 'localhost': cherryhost = hosts[0] if enable_https: