Skip to content
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

KAFKA-16703: Close serverChannel in SocketServer if unable to bind to a port #15923

Merged

Conversation

gharris1727
Copy link
Contributor

This was showing up as a leaked socket in KafkaServerTest#testListenerPortAlreadyInUse.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

… a port

Signed-off-by: Greg Harris <greg.harris@aiven.io>
Copy link
Contributor

@gaurav-narula gaurav-narula left a comment

Choose a reason for hiding this comment

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

Nice! LGTM

@chia7712
Copy link
Contributor

serverChannel.configureBlocking(false)

As serverChannel.configureBlocking(false) can throw exception, maybe we should include that in the try block?

Signed-off-by: Greg Harris <greg.harris@aiven.io>
Copy link
Contributor

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

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

LGTM

@chia7712 chia7712 merged commit de105a8 into apache:trunk May 14, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants