Jump to content


Photo
Question

Detect when Steam kills my sessions

node.js node-steam-tradeoffer-manager

  • Please log in to reply
3 replies to this topic

#1 Nogtail

Nogtail

    Newbie

  • Member
  • Pip
  • 6 posts

Posted 03 April 2016 - 06:51 PM

After around 50 hours of my server starting I get 'Error: Not Logged In' when trying to send trade offers, I would assume this is because Steam has let my cookies expire (or just killed them because they hate me).

 

Is there a way to detect when the session is no longer valid so I can create a new one? or is it better to refresh them on a timer every hour or so? (I am using node-steamcommunity)

 

Thanks in advance.


Edited by Nogtail, 03 April 2016 - 07:06 PM.


#2 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,992 posts

Posted 03 April 2016 - 10:15 PM

https://github.com/D...#sessionexpired

 

And yes, refreshing cookies every hour or so isn't a bad idea.



#3 Nogtail

Nogtail

    Newbie

  • Member
  • Pip
  • 6 posts

Posted 03 April 2016 - 11:08 PM

https://github.com/D...#sessionexpired

 

And yes, refreshing cookies every hour or so isn't a bad idea.

As I am only using node-steamcommunity to get the session, will the event fire as I am not doing anything to cause any HTTP requests?



#4 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,992 posts

Posted 03 April 2016 - 11:21 PM

No, the event won't fire if there isn't any HTTP traffic going on. But if you pass the SteamCommunity instance to the constructor of TradeOfferManager, then the manager will use that community for its HTTP requests and so no-session requests triggered by the manager will fire the event.


  • Nogtail likes this





Also tagged with one or more of these keywords: Question, node.js, node-steam-tradeoffer-manager

2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users