I started the bot, turned off my wifi and after 30 seconds turned it on again. Then the bot connected to Steam immediately, there was no need to call "login" function in "disconnected" event because I have found in steam-user documentation that bot automatically logs in when it is disconnected from Steam: http://prntscr.com/fkv1oj But the problem is that when my bot goes offline, it doesn't log in back again and starts spamming "Session expired. Reconnecting...", but never fully reconnects: http://prntscr.com/fktl8y
client.on('disconnected', function(eresult, msg) {
console.log('Disconnected.');
if (typeof eresult !== 'undefined') {
console.log('EResult: ' + eresult);
}
if (typeof msg !== 'undefined') {
console.log('Message: ' + msg);
}
});
community.on('sessionExpired', function(err) {
console.log('Session expired. Reconnecting...');
client.webLogOn();
});