Skip to content
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

HTTPSClient error "Connection reset by peer" when making request #5

Merged
merged 2 commits into from Apr 28, 2016

Conversation

tomohisa
Copy link
Contributor

fix for

Zewo/Zewo#81 (comment)

This is workaround project. It just works with my forks (but only really changed TCP)
(HTTPSClient and TCPSSL changed only for reaching dependency to TCP)
https://www.dropbox.com/s/xeom1s4a0vgffnv/HTTPSClient_issue_fixed.zip?dl=0
@donut this is temporary workaround.
make build run on folder
Maybe you can put your key and id and test it.

Reason

TCP return reset after finishing SSL request
http://stackoverflow.com/questions/2974021/what-does-econnreset-mean-in-the-context-of-an-af-local-socket

Workaround

          do {
            try ensureLastOperationSucceeded()
          } catch SystemError.connectionResetByPeer {
            throw StreamError.closedStream(data:Data(data.prefix(received)))
          }

Tomohisa Takaoka added 2 commits April 28, 2016 03:23
some client reset tcp connection after finish sending ssl response.

To avoid exception, when reset connection, close stream and it go
through fine.
@paulofaria paulofaria merged commit 36a651f into ZewoGraveyard:master Apr 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants