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 #165 from jwulf/0.23.1
Browse files Browse the repository at this point in the history
  • Loading branch information
s3than committed May 14, 2020
2 parents 772b5c6 + 07c79f4 commit 3a1036a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "zeebe-node",
"version": "v0.23.0",
"version": "v0.23.1",
"description": "A Node.js client library for the Zeebe Microservices Orchestration Engine.",
"keywords": [
"zeebe",
Expand Down
5 changes: 3 additions & 2 deletions src/lib/ZBWorkerBase.ts
Expand Up @@ -147,16 +147,17 @@ export class ZBWorkerBase<
options.onConnectionError?.()

if (this.connected) {
this.emit(ConnectionStatusEvent.ConnectionError, onError)
this.emit(ConnectionStatusEvent.ConnectionError)
options.onConnectionError?.()
this.connected = false
this.readied = false
this.stall()
}
}
this.grpcClient.on(ConnectionStatusEvent.ConnectionError, onError)
const onReady = async () => {
if (!this.readied) {
this.emit(ConnectionStatusEvent.Ready, onReady)
this.emit(ConnectionStatusEvent.Ready)
options.onReady?.()
this.readied = true
this.connected = true
Expand Down

0 comments on commit 3a1036a

Please sign in to comment.