GoogleCloudPlatform / GoogleCloudPlatform/cloud-sql-proxy

Accept loop has improper error handling, causing wrong exit code.

Offen
#2,372 5 Kommentare 7 Reaktionen 1 zugewiesene Person Zugewiesen an @hessjcg Auf GitHub ansehen
priority: p3 type: bug
Vorherrschende Sprache
Go
Sterne
1.4k
Forks
352
Ø Merge
14 Std. 54 Min.
Gemergte PRs (30 T.)
5

Beschreibung

When the proxy receives a SIGTERM, it will close this server socket. This can result in the server.Accept() returning a non-nil error with the message
"proxy server error: accept tcp" or "use of closed network connection". This error will be put into the error channel, causing the process end with exit code 2, instead of the appropriate 143 (TERMINATED) or 0 (SUCCESS).

See https://github.com/GoogleCloudPlatform/cloud-sql-proxy/blob/main/cmd/root.go#L1143

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.