New network connection error handled

This commit is contained in:
Luis Fernando Molina committed 2018-03-23 15:31:52 +01:00
1 parent 59d8cb4f6c
commit 2d03a86d6f
2 files changed
+7 -3

No files matched your search

Binary file not shown.
+7 -3
View File
@@ -164,7 +164,9 @@ exports.newFileStorage = function newFileStorage(BOT) {
logger.write("[ERROR] createTextFile -> onFileCreated -> result = " + JSON.stringify(result));
logger.write("[ERROR] createTextFile -> onFileCreated -> response = " + JSON.stringify(response));
if (err.message.indexOf("The server is busy") > 0 || err.code === 'ECONNRESET') {
if (err.message.indexOf("The server is busy") > 0
|| err.code === 'ECONNRESET'
|| err.code === 'ENOTFOUND') {
setTimeout(secondTry, 1000);
return;
@@ -237,8 +239,10 @@ exports.newFileStorage = function newFileStorage(BOT) {
if (err) {
if (err.message.indexOf("The server is busy") > 0 || err.code === 'ECONNRESET') {
if (err.message.indexOf("The server is busy") > 0
|| err.code === 'ECONNRESET'
|| err.code === 'ENOTFOUND') {
setTimeout(secondTry, 1000);
return;