Skip to content

Commit 4994125

Browse files
committed
Fix issue with service client call queuing
1 parent 97d808d commit 4994125

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/lib/ServiceClient.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ class ServiceClient extends EventEmitter {
137137
oldCall.reject(err);
138138
}
139139

140-
// if there weren't any other calls in the queue, execute this new call
140+
// if there weren't any other calls in the queue and there's no current call, execute this new call
141141
// otherwise new call will be handled in order when others complete
142-
if (this._callQueue.length === 1) {
142+
if (this._callQueue.length === 1 && this._currentCall === null) {
143143
this._executeCall();
144144
}
145145
});
@@ -212,7 +212,7 @@ class ServiceClient extends EventEmitter {
212212

213213
// connect to the service's tcpros server
214214
return this._connectToService(serviceHost, call);
215-
})
215+
});
216216
}
217217
else {
218218
// this is a persistent service that we've already set up

0 commit comments

Comments
 (0)