-
Notifications
You must be signed in to change notification settings - Fork 637
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
Added a fix for properly reporting CONNRESET. #81
Conversation
What platform is this? On Tue, Sep 17, 2013 at 2:53 AM, Paul Kulchenko [email protected]:
|
Windows Vista 32bit, but I got reports of the same issue on Windows 7 64bit, so I presume all Windows versions may be affected. |
Diego, please let me know if you need any more information on this as I'd like to get some confirmation on the fix as it's blocking next release for my app; thank you! |
Hey Paul, As the comment states, the reason for that change that caused the bug was a Regards, On Thu, Sep 19, 2013 at 2:57 PM, Paul Kulchenko [email protected]:
|
Hi Diego, This sounds good; thank you. So, just to confirm, (1) the TCP behavior is correct with the patch. (2) the UDP problem is this: "call udp:sendto("::1", carzyport), then try a udp:receive(). It will return nil, "closed" immediately. This is because of the WSAECONNRESET." If this is the only but I'm going to see with the current fix, I can probably live with it. I'm trying to decide what the risk is with patching it myself versus waiting for your proper fix (I'll definitely upgrade in either case when the fix is out).
Can you try this as you suggested, instead of splitting into two functions? |
Hi Diego, can you confirm that the TCP behavior is correct with the patch? I'd like to compile the code with my patch, but want to make sure that nothing else breaks. Thank you! |
I need to get a Windows machine up and running to test this. But the only On Tue, Sep 24, 2013 at 8:59 PM, Paul Kulchenko [email protected]:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR was opened before GitHub had their little "allow maintainers to update" feature. Can you merge from master to get Windows CI jobs running in this PR so we can confirm this is still correct?
a0d7412
to
e4451fa
Compare
@alerque, I rebased the changes against the current master and all the checks should be passing. |
Only one decade after submission. I'm sure there must me some slower moving projects out there. |
Better later than never ;); thank you for merging! |
This patch fixes an issue with the current version of the library that doesn't properly report CONNRESET to the application.
This issue is 100% reproducible in my application, even though I failed to create a simple script to demonstrate it on. The issue happens when the process on the other side of the connection is killed. I bisected this issue to the commit 734cc23 with the following comment:
Also a very relevant discussion on the related pull request here.
By reviewing the symptoms I see, this is exactly what happens: my application that uses
copas
doesn't get "nil, closed" event, only sees "nil, timeout", and continues 'selecting' the socket that has already been closed, thus never returning the control.This issue is fixed in the commit by changing
to
or by adding
continue
statement in the current HEAD as I did in the patch.I get all the tests passing with these changes and my application is working correctly.
I can provide instructions on how to test this using my app; it may only take 3-5m or so to set it up.