DistroByte / AwF-Bot

A bot that helps communicate between Factorio clients and a Discord server
MIT License
10 stars 4 forks source link

RCON connections seemingly not working sometimes #53

Closed oof2win2 closed 3 years ago

oof2win2 commented 3 years ago

RCON connections for Factorio servers aren't working sometimes. I couldn't find any logical reasoning behind it, so here are the errors. Images show the output of ?po before I joined, second image is after I joined.

0|JammyBot  | Connection Error --- Details --- 
0|JammyBot  | NAME: Error 
0|JammyBot  | DESC: undefined 
0|JammyBot  | Stack: Error: Timeout for packet id 1
0|JammyBot  |     at Timeout._onTimeout (/opt/factorio/AwF-Bot-Production/node_modules/rcon-client/lib/rcon.js:117:28)
0|JammyBot  |     at listOnTimeout (internal/timers.js:549:17)
0|JammyBot  |     at processTimers (internal/timers.js:492:7)
Screenshot 2021-01-01 at 21 17 03 Screenshot 2021-01-01 at 21 17 12
oof2win2 commented 3 years ago

Bug hasn't occured in a longer while, therefore I am marking this as more-info-needed

MaxDeVos commented 3 years ago

It's an issue with the rcon-client module. I'm having the same issue on a completely unrelated project.

oof2win2 commented 3 years ago

Hi, sorry for responding with this delay. As you can see above, I sent an issue to the rcon-client repo, but I will keep this issue closed, as with your insight, I believe it is not related to this project, it, however, is related to the rcon client itself. Please, correct me if I'm wrong.

MaxDeVos commented 3 years ago

If you're only needing to send (not receive), I've discovered that you can just catch this error. In my case, the data still gets sent, you just don't get a reply.