In #5 I added aclose() to the connection class so that the underlying WebSocket can be closed, and future calls to conn.execute() will raise ConnectionClosed. This is not quite enough cleanup, however, because the sessions belonging to that connection are not torn down. For example, if a caller is inside an async for session.listen(...): loop, I believe that loop will currently hang forever, because it does not receive a signal that the connection is closed. The proper behavior would be to close all open channels, which will cause all async for session.listen(...) loops to exit gracefully.
There may be other, similar issues regarding session tear-down.
In #5 I added
aclose()
to the connection class so that the underlying WebSocket can be closed, and future calls toconn.execute()
will raiseConnectionClosed
. This is not quite enough cleanup, however, because the sessions belonging to that connection are not torn down. For example, if a caller is inside anasync for session.listen(...):
loop, I believe that loop will currently hang forever, because it does not receive a signal that the connection is closed. The proper behavior would be to close all open channels, which will cause allasync for session.listen(...)
loops to exit gracefully.There may be other, similar issues regarding session tear-down.