-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Active connections time out while shipping bulk data #32
Comments
Uh, that's not typical use case. As I understood from description, here's what happens:
In this case yes, connection should be closed after all data was successfully sent to the client. I will take a look. |
Try it now - I added simple flow control for polling and streaming transports. |
Debugging fail: I'm using Regardless, I guess the race condition isn't completely avoidable, due to TCP buffering and network delay. |
I see. Looks like congestion avoidance algorithm kicked in and TCP stack decided to cache outgoing data without reporting to application layer. This change should improve situation for mobile/slow connections as well, so I'll keep it. |
The transport
send_pack()
implementations detach from the session before data transmission is complete. (They either don't useRequestHandler.flush()
, or don't request a callback.) When the pack takes a long time to transfer, theSessionContainer
can then expire the session while the client is still receiving. The client finishes receiving, tries to open the next connection, fails, and reports "Server lost session".This occurs reliably with
XhrPollingTransport
and a multi-megabyte pack. It may also affect streaming transports when they hit theamount_limit
, but I haven't tested this.The text was updated successfully, but these errors were encountered: