-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Client randomly fails to send POST request #711
Comments
It's crashing because of the call to This instance is because a socket in the client connection pool went stale. |
Darn mobile, thumbs tapping close buttons... With blocking IO, checking to see if a Connection was still alive could block the thread. So instead, the error happens the first time you try to write after the connection had been closed. |
This I understand :) I wonder why the error happens, though
Hyper client keeps pool of sockets for its requests?.. Didn't know that.
Hm, so I should just retry in such case?.. Is that a legitimate solution? |
Yep! It's likely what most people would want, but it can be customized (or turned off): http://hyper.rs/hyper/hyper/client/struct.Client.html
This is exactly what Servo does: https://github.com/servo/servo/blob/master/components/net/http_loader.rs#L684-L685 |
Thank you, will try it out after holidays. Closing :) |
I have the following code:
It randomly fails, sometimes, with the following logs and backtrace (*** for token bytes):
I checked for possible connectivity issues and tried doing the same using
curl
- there doesn't seem to be any problem. I'm using hyper0.6.15
.Could it be related to #309 by any chance? I see that issue is marked as related to server, but the symptoms seem similar: I actually don't read out the
Response
and just check the status. But I experience the problem in client so I decided to file another issue.Another reason I think it might be a problem in hyper is that I only recently started actively using GET requests intermixed with POST requests.
Sorry for not providing a minimal example and not being very specific.
The text was updated successfully, but these errors were encountered: