Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ApplicationClients.prototype.updateLazyHandling = function updateLazyHandling(hasChanged, forceUpdate) {
var self = this;
if (!forceUpdate && !hasChanged['lazy.handling.enabled']) {
return;
}
var enabled = self.remoteConfig.get('lazy.handling.enabled', true);
self.tchannel.setLazyRelaying(enabled);
self.tchannel.timers.clearTimeout(self.lazyTimeout);
if (enabled === false) {
self.tchannel.timers.clearTimeout(self.lazyTimeout);
self.lazyTimeout = self.tchannel.timers.setTimeout(turnOffLazyHandling, 30000);
} else {
self.tchannel.setLazyHandling(enabled);
}
function turnOffLazyHandling() {