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 #81
Comments
Still getting this with |
@donut looks like its different issue, I see many issues happened in openssl. I'm gonna try to debug it little bit |
https://www.googleapis.com/youtube/v3/videos?part=snippet,statistics&id=1,2&key=REDACTED |
That is the expected result when |
I see. I don't have keys so I can't test fully but yeah, still crash before I get that result |
Hey I have progress. I put print everywhere it goes and after decriptedData += try ssl.read()
print("\(#file)(\(#line)):\(#function) decriptedData:\(decriptedData)") it print following. Since its already return bad request, it should close connection, but eventually it doesn't. And trying to receive more and it returns connection reset by peer. so we need to write down code to close and return request.
|
workaround for Zewo/Zewo#81 (comment)
workaround for Zewo/Zewo#81 (comment)
workaround for Zewo/Zewo#81 (comment)
This is workaround project. It just works with my forks (but only really changed TCP) ReasonTCP return reset after finishing SSL request Workaround
@paulofaria I just assumed if server return connection reset, it means closed connection. It helps to read whole data without exception above. Do you think this workaround is good as framework? or we need more condition to determine if it is really closed (which I think it might be difficult) |
@tomohisa yeah. that's exactly the fix I was going to do. except that the |
Cool let me try with what you said |
That worked both with and without a valid key. |
@paulofaria Is there a reason you're holding off tagging VeniceX/TCP after the merge? |
@donut Yeah there is. I forgot to tag it. hahaha. |
After the merge, everything is working as expected. Marking this as closed. |
* testing for https crash workaround for Zewo/Zewo#81 (comment) * HTTPS closed on some client some client reset tcp connection after finish sending ssl response. To avoid exception, when reset connection, close stream and it go through fine. * update for 05-03 snapshot only changes dependency * change .swift-version * Update for 2016-05-03
* testing for https crash workaround for Zewo/Zewo#81 (comment) * HTTPS closed on some client some client reset tcp connection after finish sending ssl response. To avoid exception, when reset connection, close stream and it go through fine. * update for 05-03 snapshot only changes dependency * change .swift-version * Update for 2016-05-03
Gist
Download project
With snapshot 2016-4-12-a on OS X, I get "Connection reset by peer" when running this code:
The full error:
The text was updated successfully, but these errors were encountered: