Skip to content

fix(syslog): fix possible socket leak in the pool - #3810

Merged
Ziinc merged 6 commits into
Logflare:mainfrom
ruslandoga:rd/fix-nimblepool-socket-leak
Aug 17, 2026
Merged

fix(syslog): fix possible socket leak in the pool#3810
Ziinc merged 6 commits into
Logflare:mainfrom
ruslandoga:rd/fix-nimblepool-socket-leak

Conversation

@ruslandoga

@ruslandoga ruslandoga commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

This fixes a Syslog socket leak when the borrower dies after opening and transferring a connection but before check-in. It's probably quite unlikely (why would a broadway worker just die during Pool.send/2) but probably still worth doing.

Comment thread test/test_helper.exs
Mimic.copy(Logflare.Backends.Adaptor.ClickHouseAdaptor.ConnectionManager)
Mimic.copy(Logflare.Backends.Adaptor.HttpBased.Client)
Mimic.copy(Logflare.Backends.Adaptor.SlackAdaptor.Client)
Mimic.copy(Logflare.Backends.Adaptor.SyslogAdaptor.Socket)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure how best to test it since we are not waiting for anything during Socket.send/2 so we can't properly time the process exit.

@ruslandoga ruslandoga changed the title fix(syslog): fix possible socket leak in the syslog backend pool fix(syslog): fix possible socket leak in the pool Aug 11, 2026

@Ziinc Ziinc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

testing logic looks fine to me 👍

@Ziinc
Ziinc merged commit 5b6a435 into Logflare:main Aug 17, 2026
12 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