Skip to content

Commit

Permalink
MultiServer: fix legacy argument passing in websockets
Browse files Browse the repository at this point in the history
  • Loading branch information
Berserker66 committed Nov 15, 2021
1 parent bd8e1f6 commit 97f6003
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MultiServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ def update_aliases(ctx: Context, team: int):
asyncio.create_task(ctx.send_encoded_msgs(client, cmd))


async def server(websocket, path, ctx: Context):
async def server(websocket, path: str = "/", ctx: Context = None):
client = Client(websocket, ctx)
ctx.endpoints.append(client)

Expand Down Expand Up @@ -1680,7 +1680,7 @@ async def main(args: argparse.Namespace):

ctx.init_save(not args.disable_save)

ctx.server = websockets.serve(functools.partial(server, ctx=ctx), ctx.host, ctx.port, ping_timeout=None,
ctx.server = websockets.serve(functools.partial(server, ctx=ctx), host=ctx.host, port=ctx.port, ping_timeout=None,
ping_interval=None)
ip = args.host if args.host else Utils.get_public_ipv4()
logging.info('Hosting game at %s:%d (%s)' % (ip, ctx.port,
Expand Down

0 comments on commit 97f6003

Please sign in to comment.