Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

Commit

Permalink
add retry for ECONNRESET. Closes #2376
Browse files Browse the repository at this point in the history
  • Loading branch information
timsuchanek committed Jun 5, 2018
1 parent 03de277 commit 8f80942
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cli/packages/prisma-cli-engine/src/Client/Client.ts
Expand Up @@ -233,6 +233,13 @@ export class Client {
return result
}

if (e.message.includes('ECONNRESET')) {
await new Promise(r => setTimeout(r, 5000))
const result = await this.clusterClient.request(query, variables)
debug(result)
return result
}

if (
e.message.includes('ECONNREFUSED') &&
(e.message.includes('localhost') || e.message.includes('127.0.0.1'))
Expand Down

0 comments on commit 8f80942

Please sign in to comment.