Skip to content

Conversation

@nemith
Copy link

@nemith nemith commented Jul 24, 2025

I explicitly set my allow list to 127.0.0.1/32 and was surprised that with my server settings like that connections from the client would freeze indefinitely with no errors in the logs.

Digging into the problem showed that when an IP is denied it just continues for the next connection leaving the old connection to just leak and never close.

This adds explicit close. It may be better to have handle function that make sure close is in a defer to prevent future issues but that is more refactoring here. Also adds some logging when a connection is denied so that it isn't silent.

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