mirror of
https://github.com/tiennm99/mtprotoproxy.git
synced 2026-10-17 08:14:49 +00:00
more reliable logic to check reuseport availability
This commit is contained in:
1 parent
3477402c0d
commit
03f7ca1d4c
1 file changed
+1
-1
+1
-1
@@ -1069,7 +1069,7 @@ def main():
|
|||||||
middle_proxy_updater_task = asyncio.Task(update_middle_proxy_info())
|
middle_proxy_updater_task = asyncio.Task(update_middle_proxy_info())
|
||||||
asyncio.ensure_future(middle_proxy_updater_task)
|
asyncio.ensure_future(middle_proxy_updater_task)
|
||||||
|
|
||||||
reuse_port = (sys.platform != "win32")
|
reuse_port = hasattr(socket, "SO_REUSEPORT")
|
||||||
|
|
||||||
task_v4 = asyncio.start_server(handle_client_wrapper, '0.0.0.0', PORT,
|
task_v4 = asyncio.start_server(handle_client_wrapper, '0.0.0.0', PORT,
|
||||||
limit=READ_BUF_SIZE, reuse_port=reuse_port, loop=loop)
|
limit=READ_BUF_SIZE, reuse_port=reuse_port, loop=loop)
|
||||||
|
|||||||
Reference in new issue
Block a user