Skip to content

[fix] TCPServer#initialize: close channel on bind/init failure#9364

Merged
headius merged 1 commit intojruby:jruby-10.0from
kares:tcp-server_close
Apr 6, 2026
Merged

[fix] TCPServer#initialize: close channel on bind/init failure#9364
headius merged 1 commit intojruby:jruby-10.0from
kares:tcp-server_close

Conversation

@kares
Copy link
Copy Markdown
Member

@kares kares commented Apr 5, 2026

noticed during some (heavy JOSSL) TCPServer testing that the native channel wasn't being always closed.

ServerSocketChannel.open() was called without cleanup on error paths;
if bind() or initSocket() threw, the channel was leaked along with its
native file descriptor
Copy link
Copy Markdown
Member

@headius headius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@headius headius added this to the JRuby 10.0.5.0 milestone Apr 6, 2026
@headius headius merged commit 99ed08a into jruby:jruby-10.0 Apr 6, 2026
107 checks passed
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.

2 participants