Skip to content

Commit 67f38e4

Browse files
authored
Merge pull request #71 from kernwig/retry-on-epipe
Issue #69 - Retry on EPIPE error
2 parents 7909f3f + 5da1ccb commit 67f38e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ module.exports = (params) => {
191191
client.destroy() // destroy connection on timeout
192192
resetClient() // reset the client
193193
reject(err) // reject the promise with the error
194-
} else if (err && (/^PROTOCOL_ENQUEUE_AFTER_/.test(err.code) || err.code === 'PROTOCOL_CONNECTION_LOST')) {
194+
} else if (err && (/^PROTOCOL_ENQUEUE_AFTER_/.test(err.code) || err.code === 'PROTOCOL_CONNECTION_LOST' || err.code === 'EPIPE')) {
195195
resetClient() // reset the client
196196
return resolve(query(...args)) // attempt the query again
197197
} else if (err) {

0 commit comments

Comments
 (0)