Skip to content

Commit 1f752c6

Browse files
authored
Merge pull request #123 from iRoachie/econnreset
feat: add ECONNRESET to retry condition
2 parents 60d1e01 + 9b6c223 commit 1f752c6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ module.exports = (params) => {
194194
} else if (
195195
err && (/^PROTOCOL_ENQUEUE_AFTER_/.test(err.code)
196196
|| err.code === 'PROTOCOL_CONNECTION_LOST'
197-
|| err.code === 'EPIPE')
197+
|| err.code === 'EPIPE'
198+
|| err.code === 'ECONNRESET')
198199
) {
199200
resetClient() // reset the client
200201
return resolve(query(...args)) // attempt the query again

0 commit comments

Comments
 (0)