Vizzy 1 Posted April 7 Report Share Posted April 7 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 post Share on other sites
Dr. McKay 367 Posted April 7 Report Share Posted April 7 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 post Share on other sites
Vizzy 1 Posted April 8 Author Report Share Posted April 8 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 post Share on other sites
Dr. McKay 367 Posted April 8 Report Share Posted April 8 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 post Share on other sites
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.