Bugfix: Attach server to on_disconnect to prevent early closing

This commit is contained in:
Lasse Blaauwbroek
2023-06-08 08:11:23 +02:00
parent 7a8175ed84
commit 770be41b6d
5 changed files with 6 additions and 9 deletions

View File

@@ -125,8 +125,7 @@ def parse_args():
async def new_connection(stream):
server = capnp.TwoPartyServer(stream, bootstrap=CalculatorImpl())
await server.on_disconnect()
await capnp.TwoPartyServer(stream, bootstrap=CalculatorImpl()).on_disconnect()
async def main():