Jump to content
McKay Development

logon when steam servers down / reconnecting


Biscwis

Recommended Posts

Hey,

 

I am using the steam-user to connect with my user:

    // Steam logon options
    var logOnOptions = {
        "accountName": config.username,
        "password": base64.decode(config.password),
        "twoFactorCode": SteamTotp.getAuthCode(config.authCode)
    };

    console.log('Trying to connect to steam...');
    client.logOn(logOnOptions);

and using the events:

client.on('loggedOn', function() {
    console.log("Successfully logged in to steam");
});

client.on('error', function(e) {
    console.log('Steam Error: ');
    console.log(e);
});

client.on('disconnected', function(eresult, msg) {
    console.log('Steam disconnected: ');
    console.log(eresult);
});

Most of the time the connection is working and everything works ok, however there are times where I call the login function and the loggedOn function isn't being called.

It seems like steam junky servers are causing that. However I would still like to retry connect every time I fail.

 

Didn't manage to find any event to catch if I failed to connect - so I can try to reconnect and haven't seem any variables inside client that I can use to check if the connection succeeded.

 

Any way to solve this issue? Allow the steam user to retry connect or any other solution to make sure it will connect eventually?

Link to comment
Share on other sites

It will already retry connection until either it succeeds or error gets emitted.

 

Unfortunately this isn't working, error is not being emmited. And I have waited for well over an hour for it to reconnect.

 

In case this is happening closing nodejs and retrying is working most of the times, but waiting doesn't ever making it connect..

Edited by Biscwis
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.

Guest
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.

Loading...
×
×
  • Create New...