CHANGE socket to IPv6
This commit is contained in:
parent
6192978f2f
commit
1146724dfc
@ -18,11 +18,13 @@ from owrx.reporting import ReportingEngine
|
|||||||
from owrx.version import openwebrx_version
|
from owrx.version import openwebrx_version
|
||||||
from owrx.audio.queue import DecoderQueue
|
from owrx.audio.queue import DecoderQueue
|
||||||
from owrx.admin import add_admin_parser, run_admin_action
|
from owrx.admin import add_admin_parser, run_admin_action
|
||||||
|
import socket
|
||||||
import signal
|
import signal
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
|
|
||||||
class ThreadedHttpServer(ThreadingMixIn, HTTPServer):
|
class ThreadedHttpServer(ThreadingMixIn, HTTPServer):
|
||||||
|
address_family = socket.AF_INET6
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
@ -112,7 +114,7 @@ Support and info: https://groups.io/g/openwebrx
|
|||||||
Services.start()
|
Services.start()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
server = ThreadedHttpServer(("0.0.0.0", coreConfig.get_web_port()), RequestHandler)
|
server = ThreadedHttpServer(("::", coreConfig.get_web_port()), RequestHandler)
|
||||||
server.serve_forever()
|
server.serve_forever()
|
||||||
except SignalException:
|
except SignalException:
|
||||||
pass
|
pass
|
||||||
|
@ -2,7 +2,7 @@ import socket
|
|||||||
|
|
||||||
|
|
||||||
def getAvailablePort():
|
def getAvailablePort():
|
||||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
s = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
|
||||||
s.bind(("", 0))
|
s.bind(("", 0))
|
||||||
s.listen(1)
|
s.listen(1)
|
||||||
port = s.getsockname()[1]
|
port = s.getsockname()[1]
|
||||||
|
Loading…
Reference in New Issue
Block a user