From 286cebf11dd54d36a5a288833706e88f2f6d0211 Mon Sep 17 00:00:00 2001 From: Michal Kleczek Date: Tue, 3 Oct 2023 18:09:10 +0200 Subject: [PATCH] Added broken connection signals on fd3 --- main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.go b/main.go index 6445380..790d95d 100644 --- a/main.go +++ b/main.go @@ -25,6 +25,8 @@ func main() { conn.Close(context.Background()) } }() + + brokenConnectionOutput := os.NewFile(3, "") for { log.Println("Connecting to PostgreSQL") conn, err = pgx.Connect(context.Background(), "") @@ -52,6 +54,7 @@ func main() { conn.Close(context.Background()) conn = nil log.Println(err) + brokenConnectionOutput.WriteString("\n") break }