Remove nested try block
This commit is contained in:
parent
04b31f6a55
commit
e44fa4f72b
@ -31,13 +31,12 @@ class WebSocketProxy:
|
|||||||
|
|
||||||
provider_ws, provider_session = provider_connection
|
provider_ws, provider_session = provider_connection
|
||||||
|
|
||||||
try:
|
|
||||||
await asyncio.gather(
|
await asyncio.gather(
|
||||||
self._proxy_client_to_provider(ws, provider_ws, provider),
|
self._proxy_client_to_provider(ws, provider_ws, provider),
|
||||||
self._proxy_provider_to_client(provider_ws, ws, provider),
|
self._proxy_provider_to_client(provider_ws, ws, provider),
|
||||||
return_exceptions=True
|
return_exceptions=True
|
||||||
)
|
)
|
||||||
finally:
|
|
||||||
# Clean up provider connection
|
# Clean up provider connection
|
||||||
if not provider_ws.closed:
|
if not provider_ws.closed:
|
||||||
await provider_ws.close()
|
await provider_ws.close()
|
||||||
|
Loading…
Reference in New Issue
Block a user