Skip to content

Commit

Permalink
failed to write startup message error should be normalized
Browse files Browse the repository at this point in the history
  • Loading branch information
jackc committed Jun 12, 2023
1 parent 482e56a commit 5d4f901
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pgconn/pgconn.go
Expand Up @@ -318,7 +318,7 @@ func connect(ctx context.Context, config *Config, fallbackConfig *FallbackConfig
pgConn.frontend.Send(&startupMsg)
if err := pgConn.flushWithPotentialWriteReadDeadlock(); err != nil {
pgConn.conn.Close()
return nil, &connectError{config: config, msg: "failed to write startup message", err: err}
return nil, &connectError{config: config, msg: "failed to write startup message", err: normalizeTimeoutError(ctx, err)}
}

for {
Expand Down

0 comments on commit 5d4f901

Please sign in to comment.