I don't know if I good understand you but imo yes. Changed little bit my code:
manager.on('pollFailure', function (err) {
if (err) {
console.log("Error polling");
client.logOff();
}
});
client.on('disconnected', function () {
console.log("(" + dateTime() + " |" + dateTime(true) + ")" + " Disconnected... Login in again!");
setTimeout(function () {
client.logOn(logOptions);
}, 10000); // 10 seconds
}); Anyway I'm getting pollFailure - socket hang up always after 2 hours. I check my connection in VPS and also at my home connection and its not a caused by my connection. Why when I send a request to a remote server, and receive no timely response always after two hours? Edit: nope... not working.. he didn't logOn
(26/09/2017 | 14:59:45) Logged in!
(26/09/2017 | 17:00:01) Disconnected... Login in again!
Also I changed code to client.relog, but after getting new offer I got error from accepting trade: "Can't accept offer: Not logged in" Fuck off with this logOn or Relog or whatever... I just put new crontab for restart bot.js every hour and I don't give a shit about this.. I can feel pain -.-