New network connection errors discovered

This commit is contained in:
Luis Fernando Molina committed 2018-03-23 16:09:43 +01:00
1 parent 9e59c25d77
commit 17f8685254
3 files changed
+7 -3

No files matched your search

Binary file not shown.
+4 -2
View File
@@ -167,7 +167,8 @@ exports.newFileStorage = function newFileStorage(BOT) {
if (err.message.indexOf("The server is busy") > 0
|| err.code === 'ECONNRESET'
|| err.code === 'ENOTFOUND'
|| err.code === 'ESOCKETTIMEDOUT') {
|| err.code === 'ESOCKETTIMEDOUT'
|| err.code === 'ETIMEDOUT') {
setTimeout(secondTry, 1000);
return;
@@ -243,7 +244,8 @@ exports.newFileStorage = function newFileStorage(BOT) {
if (err.message.indexOf("The server is busy") > 0
|| err.code === 'ECONNRESET'
|| err.code === 'ENOTFOUND'
|| err.code === 'ESOCKETTIMEDOUT') {
|| err.code === 'ESOCKETTIMEDOUT'
|| err.code === 'ETIMEDOUT') {
setTimeout(secondTry, 1000);
return;
+3 -1
View File
@@ -401,9 +401,11 @@
logger.write("[INFO] analizeResponse -> exchangeResponse = " + JSON.stringify(exchangeResponse));
if (
JSON.stringify(exchangeErr).indexOf("ETIMEDOUT") > 0 ||
JSON.stringify(exchangeResponse).indexOf("Connection timed out") > 0 ||
JSON.stringify(exchangeResponse).indexOf("Connection Error") > 0 ||
JSON.stringify(exchangeErr).indexOf("ETIMEDOUT") > 0 ||
JSON.stringify(exchangeErr).indexOf("ENOTFOUND") > 0 ||
JSON.stringify(exchangeErr).indexOf("ESOCKETTIMEDOUT") > 0 ||
JSON.stringify(exchangeErr).indexOf("ECONNRESET") > 0) {
logger.write("[WARN] analizeResponse -> Timeout reached or connection problem while trying to access the Exchange API. Requesting new execution later.");