Commit 0f92ae3
authored
Return proper error when getting tcp closed after fatal errors (#765)
When PostgreSQL sends a FATAL or PANIC ErrorResponse, it closes the
connection immediately without sending ReadyForQuery.
Postgrex unconditionally waited for ReadyForQuery, which would hit
tcp_closed and return a generic disconnect error, discarding the
original FATAL error.1 parent 3385a98 commit 0f92ae3
2 files changed
Lines changed: 37 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3069 | 3069 | | |
3070 | 3070 | | |
3071 | 3071 | | |
| 3072 | + | |
| 3073 | + | |
3072 | 3074 | | |
3073 | 3075 | | |
3074 | | - | |
3075 | 3076 | | |
3076 | 3077 | | |
3077 | 3078 | | |
3078 | | - | |
| 3079 | + | |
| 3080 | + | |
| 3081 | + | |
| 3082 | + | |
| 3083 | + | |
3079 | 3084 | | |
3080 | 3085 | | |
3081 | 3086 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1940 | 1940 | | |
1941 | 1941 | | |
1942 | 1942 | | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
| 1946 | + | |
| 1947 | + | |
| 1948 | + | |
| 1949 | + | |
| 1950 | + | |
| 1951 | + | |
| 1952 | + | |
| 1953 | + | |
| 1954 | + | |
| 1955 | + | |
| 1956 | + | |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
| 1965 | + | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
1943 | 1973 | | |
1944 | 1974 | | |
1945 | 1975 | | |
| |||
0 commit comments