mirror of
https://github.com/alexbers/mtprotoproxy.git
synced 2026-03-21 01:55:49 +00:00
more reliable logic to check reuseport availability
This commit is contained in:
@@ -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