2
0

Fix die on receive message error

This commit is contained in:
Jack Christensen
2019-01-12 16:17:03 -06:00
parent 9c36fa1e50
commit b3cde6830f
+1 -1
View File
@@ -263,7 +263,7 @@ func (pgConn *PgConn) ReceiveMessage() (pgproto3.BackendMessage, error) {
msg, err := pgConn.Frontend.Receive()
if err != nil {
// Close on anything other than timeout error - everything else is fatal
if err, ok := err.(net.Error); !ok && err.Timeout() {
if err, ok := err.(net.Error); !(ok && err.Timeout()) {
pgConn.hardClose()
}