diff --git a/package.json b/package.json index 96da939a..add35bd3 100644 --- a/package.json +++ b/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", diff --git a/src/lib/ZBWorkerBase.ts b/src/lib/ZBWorkerBase.ts index 74e5ecfb..3f06479f 100644 --- a/src/lib/ZBWorkerBase.ts +++ b/src/lib/ZBWorkerBase.ts @@ -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