diff options
author | Olivier Gayot <olivier.gayot@sigexec.com> | 2020-05-27 20:56:43 +0200 |
---|---|---|
committer | Olivier Gayot <olivier.gayot@sigexec.com> | 2020-05-28 01:06:23 +0200 |
commit | 5f75a3a378bf4859e3b25ff4c0267b4787ce6d4f (patch) | |
tree | 4a4b3ec0507e93ed10ed9ba696554ff7233fb776 | |
parent | 05235c8df61b0cd6bf588ee15a924576cb10aa0a (diff) |
Rename function swiftory connection_handler
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
-rw-r--r-- | swiftstory/SwiftStory.py | 4 |
1 files changed, 2 insertions, 2 deletions
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() |