Replies: 1 comment
-
|
I think that's technically accurate, yes. The reset happens once a message has been read in the receive() method: Lines 578 to 579 in df0d897 If you wanted to work on improving it, I guess it'd be possible to have the timer reset on feed_data() instead, whenever it receives any bytes: aiohttp/aiohttp/_websocket/reader_py.py Line 178 in df0d897 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Assume a slow network connection.
During a
receive()the code appears such that the entire frame fromsend_bytesmust be received before the heartbeat is reset. If the entire frame takes longer than the heartbeat interval to arrive due to network latency I believe the client will disconnect because the timer is not reset and (of course) neither is the pong received.The documentation says "The timer is reset on any data reception" - however, this isn't entirely true from what I can tell. Data might be received by the underlying protocol, but the timer is not reset until the entire blob as sent by
send_byteshas been received, not when "any data".Is this correct, and is the only workaround to make the heartbeat at least as long as the largest message will take.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions