Skip to content

Commit

Permalink
Server listen on all interface if get_internal_ip fail
Browse files Browse the repository at this point in the history
  • Loading branch information
palaviv committed Dec 19, 2016
1 parent 6bcd0e6 commit 27636e9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion caster.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ def main():

dev.wait()

server_ip = get_internal_ip(dev.host)
try:
server_ip = get_internal_ip(dev.host)
except Exception:
# See https://github.com/palaviv/caster/issues/1
server_ip = "0.0.0.0"

server = ThreadedHTTPServer((server_ip, 0), RequestHandler)
server_thread = threading.Thread(target=server.serve_forever)
Expand Down

0 comments on commit 27636e9

Please sign in to comment.