You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I dont think the issue existed before, but I recently found that the socket (either ReconnectingSocket or KeepAliveSocket), the __aexit__ is always delayed for exact 10 seconds:
asyncwithsocket:
print('done')
print('close') # this message is always 10 secs late after the 'done' message
I dig a little bit of the code and I think it is because the socket is waiting for data in the _read_loop:
Correct, on exit we kill the read loop, which if it's streaming it would wait till the next message or the timeout to go over the loop and exit.
Would editing the value of self.TIMEOUT to a smaller value work for you?
I dont think the issue existed before, but I recently found that the socket (either ReconnectingSocket or KeepAliveSocket), the
__aexit__
is always delayed for exact 10 seconds:I dig a little bit of the code and I think it is because the socket is waiting for data in the
_read_loop
:and
self.TIMEOUT
is 10, which explains the 10 secs delay.Am I right? And how do you remove the delay?
The text was updated successfully, but these errors were encountered: