mirror of
https://github.com/alexbers/mtprotoproxy.git
synced 2026-03-13 23:03:09 +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())
|
||||
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,
|
||||
limit=READ_BUF_SIZE, reuse_port=reuse_port, loop=loop)
|
||||
|
||||
Reference in New Issue
Block a user