Skip to content

Cleanup IO state for true connect failures#7635

Merged
headius merged 1 commit intojruby:jruby-9.3from
headius:cleanup_bad_connect
Feb 9, 2023
Merged

Cleanup IO state for true connect failures#7635
headius merged 1 commit intojruby:jruby-9.3from
headius:cleanup_bad_connect

Conversation

@headius
Copy link
Member

@headius headius commented Feb 8, 2023

When a connect_nonblock ultimately fails with one of these exceptions, we should tidy up the internal IO bits so it does not appear to be a usable stream. This lack of cleanup caused any call to close after a failed connection to raise EBADF, because the socket appeared to be open but was not.

Fixes #7483

When a connect_nonblock ultimately fails with one of these
exceptions, we should tidy up the internal IO bits so it does not
appear to be a usable stream. This lack of cleanup caused any
call to `close` after a failed connection to raise EBADF, because
the socket appeared to be open but was not.

Fixes jruby#7483
@headius headius added this to the JRuby 9.3.11.0 milestone Feb 8, 2023
@headius headius merged commit 3ed21f0 into jruby:jruby-9.3 Feb 9, 2023
@headius headius deleted the cleanup_bad_connect branch February 9, 2023 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant