Closed dqian closed 6 years ago
You are right, I guess it depends on how you wrap the client with other modules from your code. However, if you are already running a loop, you should hit Line 49 instead of 47, isn't that the case? Maybe there is a bug and/or I missed something.
I am interested to see your modification
Ah ic. I simply need to run my event loop prior to the start
method invocation to trigger ln 49. It just so happens in my test code that's not the case but in production, it will be. Thanks!
https://github.com/slazarov/python-signalr-client/blob/fe2da6cd469fce73ec237aa988be66e9fdc58573/signalr_aio/transports/_transport.py#L47
Should
asyncio.ensure_future
be considered for this call? Currently, I've been wrapping thestart
invocation on theconnection
module in a coroutine anyway. Any reason why it should not natively be a coroutine?