Skip to content

Commit

Permalink
Added broken connection signals on fd3
Browse files Browse the repository at this point in the history
  • Loading branch information
mkleczek committed Oct 3, 2023
1 parent 51dc97f commit 286cebf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(), "")
Expand Down Expand Up @@ -52,6 +54,7 @@ func main() {
conn.Close(context.Background())
conn = nil
log.Println(err)
brokenConnectionOutput.WriteString("\n")
break
}

Expand Down

0 comments on commit 286cebf

Please sign in to comment.