Skip to content
This repository was archived by the owner on Feb 18, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions service-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,19 @@ ServiceDispatchHandler.prototype.ensurePartialConnections =
function ensurePartialConnections(serviceChannel, serviceName, hostPort, reason, now) {
var self = this;

// TODO: could debounce up to N-ms per serviceName

setImmediate(deferEnsure);

function deferEnsure() {
self._ensurePartialConnections(serviceChannel, serviceName, hostPort, reason, now);
}
};

ServiceDispatchHandler.prototype._ensurePartialConnections =
function _ensurePartialConnections(serviceChannel, serviceName, hostPort, reason, now) {
var self = this;

var partialRange = self.getPartialRange(serviceName, reason, now);
if (!partialRange) {
return null;
Expand Down