cloud-sql-proxy
cloud-sql-proxy copied to clipboard
fix: Handle the errors when the listener socket is closed gracefully.
The accept loop for socket connections now will properly handle the error case where the listener socket is closed gracefully.
Fixes #2372
Nice find! This probably deserves a test, if only of the private method, so that future maintainers don't trip over this again.
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.