Commit f4d3fb0
committed
pgconn: improve comment explaining nil, nil path in Pipeline.Close
Expand the comment on the results == nil guard in Pipeline.Close() to
explain exactly when and why getResults() returns (nil, nil):
When the server sends FATAL errors that consume queued request slots
(e.g. Prepare, Sync) without ever sending ReadyForQuery, the request
event queue is exhausted while expectedReadyForQueryCount remains > 0.
ExtractFrontRequestType() returns pipelineNil, getResults() returns
(nil, nil), and without this guard the loop would spin indefinitely.1 parent c3ede46 commit f4d3fb0
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2836 | 2836 | | |
2837 | 2837 | | |
2838 | 2838 | | |
2839 | | - | |
2840 | | - | |
| 2839 | + | |
| 2840 | + | |
| 2841 | + | |
| 2842 | + | |
| 2843 | + | |
2841 | 2844 | | |
2842 | 2845 | | |
2843 | 2846 | | |
| |||
0 commit comments