Allow websocket server to reuse its port (handle crashes better)
This commit is contained in:
parent
1e6dffcdcc
commit
e2268c0c34
1 changed files with 1 additions and 1 deletions
|
@ -34,7 +34,7 @@ class WebsocketsReceiver(Receiver):
|
||||||
|
|
||||||
async def start(self, player: Player) -> None:
|
async def start(self, player: Player) -> None:
|
||||||
self.player = player
|
self.player = player
|
||||||
await serve(self.handle, host=self.config.host, port=self.config.port)
|
await serve(self.handle, host=self.config.host, port=self.config.port, reuse_port=True)
|
||||||
|
|
||||||
async def handle(self, conn: WebSocketServerProtocol) -> None:
|
async def handle(self, conn: WebSocketServerProtocol) -> None:
|
||||||
self.connections.add(conn)
|
self.connections.add(conn)
|
||||||
|
|
Loading…
Reference in a new issue