Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #153 from jwulf/0.23.0-alpha.4
Browse files Browse the repository at this point in the history
0.23.0 alpha.4
  • Loading branch information
s3than authored Apr 6, 2020
2 parents 6931a01 + def7fe4 commit 3d751f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zeebe-node",
"version": "v0.23.0-alpha.3",
"version": "v0.23.0-alpha.4",
"description": "A Node.js client library for the Zeebe Microservices Orchestration Engine.",
"keywords": [
"zeebe",
Expand Down
6 changes: 4 additions & 2 deletions src/lib/GrpcClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,9 @@ export class GrpcClient extends EventEmitter {
MiddlewareSignals.Log.Error,
`Grpc Channel State: ${connectivityState[state]}`
)
const delay = state === GrpcState.TRANSIENT_FAILURE ? 5 : 30
const deadline = new Date().setSeconds(
new Date().getSeconds() + 300
new Date().getSeconds() + delay
)
if (state === GrpcState.IDLE || state === GrpcState.READY) {
return resolve(state)
Expand Down Expand Up @@ -483,7 +484,8 @@ export class GrpcClient extends EventEmitter {
)
if (
newState === GrpcState.READY ||
newState === GrpcState.IDLE
newState === GrpcState.IDLE ||
newState === GrpcState.TRANSIENT_FAILURE
) {
return resolve(newState)
} else {
Expand Down

0 comments on commit 3d751f3

Please sign in to comment.