Skip to content

Commit

Permalink
Fixed an issue that prevented Bazarr from starting when PIv6 has been…
Browse files Browse the repository at this point in the history
… disabled using grub. #2738
  • Loading branch information
morpheus65535 committed Oct 28, 2024
1 parent ac1a3c5 commit 4eb09c5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bazarr/app/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ def configure_server(self):
threads=100)
self.connected = True
except OSError as error:
if error.errno == errno.EADDRNOTAVAIL:
if error.errno == 49:
logging.exception("BAZARR cannot bind to specified IP, trying with 0.0.0.0")
self.address = '0.0.0.0'
self.connected = False
super(Server, self).__init__()
elif error.errno == errno.EADDRINUSE:
elif error.errno == 48:
if self.port != '6767':
logging.exception("BAZARR cannot bind to specified TCP port, trying with default (6767)")
self.port = '6767'
Expand All @@ -64,6 +64,11 @@ def configure_server(self):
logging.exception("BAZARR cannot bind to default TCP port (6767) because it's already in use, "
"exiting...")
self.shutdown(EXIT_PORT_ALREADY_IN_USE_ERROR)
elif error.errno == 97:
logging.exception("BAZARR cannot bind to IPv6 (*), trying with 0.0.0.0")
self.address = '0.0.0.0'
self.connected = False
super(Server, self).__init__()
else:
logging.exception("BAZARR cannot start because of unhandled exception.")
self.shutdown()
Expand Down

0 comments on commit 4eb09c5

Please sign in to comment.