-
-
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
Handle a connection abort error on shutdown #2319
Handle a connection abort error on shutdown #2319
Conversation
@@ -358,7 +358,7 @@ def __init__(self, options=None): | |||
# Tour # TODO: Should I consider it a plugin?? or? | |||
self.tour = None | |||
self.tours_available = None | |||
|
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.
Please revert blanks deletion :-)
Fixed ws and added a fix for Windows. |
@@ -2646,6 +2646,9 @@ def start_open_files_server(self): | |||
# To avoid a traceback after closing on Windows | |||
if e.args[0] == eintr: | |||
continue | |||
# handle a connection abort on close error | |||
if e.args[0] in [errno.ECONNABORTED, errno.ENOTSOCK]: | |||
return |
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.
Why here return
and not continue
? I say it because I tried to fix this error in commit e18294f but I thought the right thing to do was to use continue
. Later I had to revert that one because complained that Spyder took up to half an hour to start or close!! :-)
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.
I also forgot to mention that errno.ENOTSOCK
is not available on Windows. See my referenced commit for the right error on Win.
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.
I used return
because it only happened at shutdown.
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.
It is so frustrating when they do that in the standard library.
Whoops, fixed. |
@blink1073 squashing into a single commit? |
Handle a connection abort error on shutdown Revert some ws changes Revert more ws changes Revert one more ws change Revert all ws changes Add shutdown handling on windows Another ws revert Make the error check cross platform Reinstate the Econnaborted check
62815f6
to
c06a500
Compare
Done. |
Ok, let's hope this fixes this problem once and for all :-) Merging! |
Handle a connection abort error on shutdown
Much nicer without that pesky error on shutdown! |
Yes, absolutely!! I've been trying to fix this bug for months without success :-) |
I was getting the following traceback on shutdown, which is now avoided: