From 5f75a3a378bf4859e3b25ff4c0267b4787ce6d4f Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Wed, 27 May 2020 20:56:43 +0200 Subject: Rename function swiftory connection_handler Signed-off-by: Olivier Gayot --- swiftstory/SwiftStory.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'swiftstory') diff --git a/swiftstory/SwiftStory.py b/swiftstory/SwiftStory.py index 2aa1444..580f1ea 100644 --- a/swiftstory/SwiftStory.py +++ b/swiftstory/SwiftStory.py @@ -58,7 +58,7 @@ def message_received_handler(client, message): return error('invalid command') -async def swiftstory(websocket, path): +async def connection_handler(websocket, path): client = Client(websocket, game_manager) with contextlib.suppress(websockets.exceptions.ConnectionClosed): @@ -74,7 +74,7 @@ def main(): parser.add_argument('--port', type=int, default=1236) args = vars(parser.parse_args()) - start_server = websockets.serve(swiftstory, args['listen'], args['port']) + start_server = websockets.serve(connection_handler, args['listen'], args['port']) asyncio.get_event_loop().run_until_complete(start_server) asyncio.get_event_loop().run_forever() -- cgit v1.2.3