-
Notifications
You must be signed in to change notification settings - Fork 12
Gracefully handle EINPROGRESS #229
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
Conversation
flodnv
commented
Jul 31, 2025
| } | ||
|
|
||
| // Check if connection completed successfully | ||
| $connectionError = socket_get_option($this->socket, SOL_SOCKET, SO_ERROR); |
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.
Not sure I get this, wouldn't socket_select already return an error and that should be handled above?
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.
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.
ok not sure really, but we can try it
| $read = null; | ||
| $except = null; | ||
|
|
||
| $selectResult = socket_select($read, $write, $except, $this->connectionTimeout, $this->connectionTimeoutMicroseconds); |
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.
Not that it matters much, but this would basically double the timeout (since we would wait for the timeout in socket_connect and then again here.
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 think that's fine if we lower the timeout to 500ms, which I'll do
|
Version created |



