Skip to content

Conversation

@AmirWiener
Copy link
Contributor

TcpSyslogMessageSender.close() method is public, and can be called from outside.
However, the socket is private and it's value can't be verified.
Since trying to close a null socket makes no sense, wrapping it with a null check is requested.

@pmconrad
Copy link

pmconrad commented May 6, 2023

This is already in #45, which adds the same check also for UDPMessageSender.

Copy link
Member

@basil basil left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

@basil basil added the bug label Jul 10, 2025
@basil basil merged commit 2753e8d into jenkinsci:master Jul 10, 2025
16 checks passed
@basil basil changed the title prevent NPE in TcpSyslogMessageSender.close() Prevent NPE in TcpSyslogMessageSender#close Jul 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants