This repository has been archived by the owner on Oct 1, 2021. It is now read-only.
Poor connection maintenance and exception strategy in JsonRpcClient
#37
Labels
JsonRpcClient
#37
currently lib takes no actual care and does not really "knows" whatever connection is alive, also
it has very poor interface to inform user of such problem. handling connection recovery becomes a mess.
If connection becomes a mess, first we could receive something from the depths of aiohttp and asyncio such as
RuntimeError("Transport closed...")
,if we try to connect to nonexisting host (name not resolved) we receive:
at first, but when comes the worst, after an unsuccessful attempt to connect
JsonRpcClient
object is left in such state what it does not tries to autoconnect and instead throws:because attribute
_ws
is not dropped upon previous connection failure.Please consider making consistent exception strategy and try not to leave objects in non recoverable state. Taming such interface is a pain.
The text was updated successfully, but these errors were encountered: