GoogleCloudPlatform / GoogleCloudPlatform/cloud-sql-proxy

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

Abierto
#2,372 5 comentarios 7 reacciones 1 asignado Asignado a @hessjcg Ver en GitHub
priority: p3 type: bug
Lenguaje dominante
Go
Estrellas
1.4k
Forks
352
Merge medio
14 h 54 min
PR fusionados (30 d)
5

Descripción

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.