for docker

This commit is contained in:
purerosefallen 2019-06-01 23:43:04 +08:00
parent a0228faf61
commit 645eda6c9f
No known key found for this signature in database
GPG Key ID: E6D78C90943A3185

View File

@ -337,6 +337,6 @@ async def connection(ws, path):
port = int(sys.argv[1]) if len(sys.argv) > 1 else 34802
print('Starting server on port %d' % port)
asyncio.get_event_loop().run_until_complete(
websockets.serve(connection, "localhost", port)
websockets.serve(connection, "0.0.0.0", port)
)
asyncio.get_event_loop().run_forever()