Skip to content

Commit

Permalink
fix(zeebe): waitForReady deadline not miliseconds, but date (#148)
Browse files Browse the repository at this point in the history
"waitForReady" was called with a deadline of 10000 milliseconds.

But the method 'watchConnectivityState' used by 'waitForReady', wants a deadline date.

So this fix is to set the deadline date at now + 10s
  • Loading branch information
lsidoree authored May 6, 2024
1 parent d1df3d3 commit 12db206
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/zeebe/lib/GrpcClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ export class GrpcClient extends EventEmitter {
})
this.listNameMethods = []

this.client.waitForReady(10000, (error) =>
this.client.waitForReady(new Date(Date.now() + 10000), (error) =>
error
? this.emit(MiddlewareSignals.Event.Error, error)
: this.emit(MiddlewareSignals.Event.Ready)
Expand Down

0 comments on commit 12db206

Please sign in to comment.