senna Posted January 13, 2017 Report Posted January 13, 2017 Hello! 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? Thanks! Quote
Dr. McKay Posted January 13, 2017 Report Posted January 13, 2017 autoRelogin will handle all cases in which it gets disconnected from Steam, including if your Internet goes down. It can't actually tell the difference, really. Steam being unavailable is Steam being unavailable, regardless of whose end the problem is on. Quote
senna Posted January 13, 2017 Author Report Posted January 13, 2017 (edited) 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 January 13, 2017 by senna Quote
Dr. McKay Posted January 14, 2017 Report Posted January 14, 2017 loggedOn will be emitted when it reconnects. Quote
senna Posted January 14, 2017 Author Report Posted January 14, 2017 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? :/ Quote
Dr. McKay Posted January 14, 2017 Report Posted January 14, 2017 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); Quote
senna Posted January 14, 2017 Author Report Posted January 14, 2017 (edited) 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? Thanks Edited January 14, 2017 by senna Quote
Dr. McKay Posted January 15, 2017 Report Posted January 15, 2017 When Steam goes down the application will be notified of the connection being closed. Experimental does mean that there could be problems, yes. Quote
senna Posted January 15, 2017 Author Report Posted January 15, 2017 What i should do to use tcp in linux and if my internet goes down restart it? my goal is to have a bot running and restarting when is needed. i will use trade manager, the bot is only for trades Quote
Dr. McKay Posted January 16, 2017 Report Posted January 16, 2017 How often is your internet going down? You could periodically make some request that results in a response, and reconnect if you don't get a response in x time after y attempts. Quote
Recommended Posts
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.