aiotruenas-client
aiotruenas-client copied to clipboard
Handle disconnections gracefully
Looks like we need to build some code to handle disconnections from the server and automatically reconnect. https://github.com/aaugustin/websockets/issues/414 has some sample code.
An attempt with async-generator https://gist.github.com/filwaline/37309797265079f2ad7fcc47999575b2
I put some work into how to do this yesterday, and it's hard to do it at our library level, I think. We can make it easier for clients to detect if the connect was closed, however, and re-initialize it.