vk-fast-longpoll
Advanced tools
Comparing version 2.0.18 to 2.0.19
@@ -55,8 +55,5 @@ 'use strict'; | ||
let executeHandler = (current, err, res, body) => { | ||
if(res.statusCode != 200 || err) | ||
if(err) | ||
{ | ||
if(res.statusCode != 200) | ||
logger.error(res.statusCode + ' | ' + res.statusMessage); | ||
else if(err) | ||
logger.error(err); | ||
logger.error(err); | ||
for(let i in current) | ||
@@ -67,2 +64,10 @@ this._queue.unshift(current[i]); | ||
} | ||
if(res.statusCode != 200) | ||
{ | ||
logger.error(res.statusCode + ' | ' + res.statusMessage); | ||
for(let i in current) | ||
this._queue.unshift(current[i]); | ||
setTimeout(this._executeLoop, this._time); | ||
return; | ||
} | ||
if('error' in body) | ||
@@ -69,0 +74,0 @@ { |
@@ -79,7 +79,14 @@ 'use strict'; | ||
}, (err, res, body) => { | ||
if(res.statusCode != 200 || err) | ||
if(err) | ||
{ | ||
logger.error(err); | ||
process.nextTick(this.listen.bind(this)); | ||
return; | ||
} | ||
if(res.statusCode != 200) | ||
{ | ||
logger.error(res.statusCode + ' | ' + res.statusMessage); | ||
process.nextTick(this.listen.bind(this)); | ||
return; | ||
} | ||
if('failed' in body) | ||
@@ -86,0 +93,0 @@ { |
@@ -33,3 +33,3 @@ { | ||
}, | ||
"version": "2.0.18" | ||
"version": "2.0.19" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24441
862