Vizzy Posted April 7, 2021 Report Share Posted April 7, 2021 Hi, I'm running a couple of steambots but when one of the bots receives an error like TooManyRequests or LogonSessionReplaced the application crashes. I would like it not to crash, as I have a couple of other bots running as well (process.exit() is being used in the modules?). How can I stop this from happening? Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted April 7, 2021 Report Share Posted April 7, 2021 Connection errors are communicated through the error event. If you don't handle error on an EventEmitter, then Node.js will terminate the process. Quote Link to comment Share on other sites More sharing options...
Vizzy Posted April 8, 2021 Author Report Share Posted April 8, 2021 is there no other way? I feel like other unhandled errors might put the application in an unsafe state whereas a casual rate limit isn't as big of a deal, or would I just check for the specific error (and is there a list of errors that crash the application somewhere)? Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted April 8, 2021 Report Share Posted April 8, 2021 The error event is only emitted (in this module) when you get disconnected from Steam, and the module will not attempt to auto-reconnect. Handling the error event isn't going to act like handling the uncaughtException event; it's not going to prevent crashes for other errors besides Steam disconnects. Quote Link to comment Share on other sites More sharing options...
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.