-
Notifications
You must be signed in to change notification settings - Fork 27
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
OSError: [WinError 10048] on spawning of PtyProcess #86
Comments
Hmm. This
is not correct according to Python socket documentation. Maybe the only problem is that get_address is separated from the bind operation and it was pure luck that I did get the error less often after my code modification. |
Could you open a pull request for this? Thanks! |
Just for completeness: The error message was
|
This is a follow up of #85. (Pywintypes 0.5.1, Win7, Python-3.6.4-64bit)
If a socket is already in use, an OSError is raised on Windows. However, _get_address increments the port number only for socket.error but not for OSError.
Changing the code to increment the port number on OSError solves the problem 99% of the time. However, sometimes another process acquires the port between _get_address (where the port is closed at the end) and the bind operation in PtyProcess.init(...). I think it is not a good idea to separate _get_adress from the actual bind in PtyProcess.init(...).
The text was updated successfully, but these errors were encountered: