GoogleCloudPlatform / GoogleCloudPlatform/cloud-sql-proxy

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

Ouverte
#2,372 5 commentaires 7 réactions 1 personne assignée Assignée à @hessjcg Voir sur GitHub
priority: p3 type: bug
Langage dominant
Go
Étoiles
1.4k
Forks
352
Merge moyen
14 h 54 min
PR mergées (30 j)
5

Description

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

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.