cloud-sql-proxy icon indicating copy to clipboard operation
cloud-sql-proxy copied to clipboard

fix: Handle the errors when the listener socket is closed gracefully.

Open hessjcg opened this issue 1 year ago • 2 comments

The accept loop for socket connections now will properly handle the error case where the listener socket is closed gracefully.

Fixes #2372

hessjcg avatar Jan 21 '25 19:01 hessjcg

Nice find! This probably deserves a test, if only of the private method, so that future maintainers don't trip over this again.

enocom avatar Jan 21 '25 19:01 enocom

I'm converting this back to a draft, because after some testing, the errors returned from l.Accept() on socket close are not exactly as documented.

hessjcg avatar Jan 29 '25 19:01 hessjcg