Jump to content
McKay Development

Reconnect when my internet go down


Recommended Posts



    I'm new in the module/forum, as i can see is very interesting module and i'm having fun using it.


    But right now i found something i want and i can't find a way.


    When i just disconnect my computer running the bot from internet and i reconnect (can take 5 secs, 10 secs), as long as bot stays "Online"...

in my main account running official steam client if i start a conversation with the bot i can see a handled message "Handled message: ClientFriendMsgIncoming", and more like if i change my status "Handled message: ClientPersonaState".


...but let's imagine, if my internet goes down for 5mins...

The bot is not anymore Online and goes Offline...

The bot is actually running but i guess its like dead but maybe only for chat functionality because im Offline, didn't test events that dont need chat to be online, give me info about this please.

How i can make it goes online again and work again if my internet goes online, there is a autoRelogin but is for steam disconnects not my internet disconnects im right?






Link to comment
Share on other sites

ok but the reconnect in this situation is very delayed unless bot is online when internet is back (maybe 30 secs or less +/-)


is possible to handle the problem and setPersona online? because i can't, for example call setPersona after a reconnect, steamID prop is'nt null so im logged in, i also cant call webLogOn method lets imagine inside  process event SIGINT (ctrl+c) after reconnect, no response obtained.

Edited by senna
Link to comment
Share on other sites

Yes, I got it,

I runned the bot in windows 10 and works like a charm.


I have disconnect event and it shows eresult 3, but in ubuntu 16 and my lubuntu old laptop the disconnect event dont fire lol... with the same code/steps/internet/cable... lets say in windows I run bot, bot is logged in, now I disconnect rj45, disconnect event is fired after 5 secs +/- and if I connect the cable again is very fast the reconnect... all of this with autoRelogin true... but in ubuntu (in same laptop as dual boot) doesnt work the reconnect at all... disconnect event isnt fired and dont reconnect as I said


So what? :/

Link to comment
Share on other sites

Linux/Unix doesn't seem to think it very important to notify applications of closed TCP connections when the network goes down. You could use node-steam-client's experimental UDP support if this is a situation that will affect you regularly:

var SteamClient = require('steam-client');
var client = new SteamClient.CMClient(SteamClient.EConnectionProtocol.UDP);
var user = new SteamUser(client);
Link to comment
Share on other sites

Cool worked.
But I dont understand why. You said ... Linux/Unix doesn't seem to think it very important to notify applications of closed TCP connections when the network goes down...


if steam goes down the reconnect in tcp works normal?

and if the problem is my internet connection i have to restart manually as i already see no reconnect?

Also what experimental means here? using it can end in error sometimes?



Edited by senna
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...