Closed belm0 closed 5 years ago
more importantly, the user may want to treat the cases separately (e.g. pass on disconnect timeout)
Another reason not to use TooSlowError: if the user employs fail_after()
within the open_websocket() context for any purpose, he can't discern between trio-websocket connection timeouts and his app's own errors.
When there is a timeout raising TooSlowError, it's not obvious how to discern between connect and disconnect timeout for logging or raising a detailed error.
Perhaps trio-websocket should have a custom exception for timeout.