DoctorMcKay / node-steam-user

Allows interaction with the Steam network via the Steam client protocol
https://dev.doctormckay.com/forum/7-node-steam-user/
MIT License
888 stars 157 forks source link

connect ETIMEDOUT error is not caught in error event listener #496

Closed aligatorr89 closed 1 week ago

aligatorr89 commented 1 month ago

Describe the bug

Whenever connect ETIMEDOUT is thrown out of SteamUser client, it is not caught in error event listener. It is causing server to shut down. I am using httpProxy and whenever 1 proxy is faulty it breaks whole server.

    this.steamUser = new SteamUser({
      httpProxy,
      promptSteamGuardCode: false,
    });

Expected solution: connect ETIMEDOUT can be caught on 'error' listener.

    this.steamUser.on('error', (error: any) => {
      return this.emit('error', { code: 'LOGIN', error });
    });

Versions

4.24.3

Screenshots and Error Logs

aligatorr89 commented 1 month ago

@DoctorMcKay here are more details about error that is causing uncaughtException

"Error: connect ETIMEDOUT $IP_ADDR
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1595:16)"
address: "$IP_ADDR"
code: "ETIMEDOUT"
errno: -110
port: PORT
syscall: "connect"
Sadzurami commented 1 month ago

@aligatorr89 you are using outdated lib version.

It may be fixed in 5.1.0. Try to update.

aligatorr89 commented 4 weeks ago

@aligatorr89 you are using outdated lib version.

It may be fixed in 5.1.0. Try to update.

@Sadzurami I will try it and close this bug report asap!

aligatorr89 commented 1 week ago

connect ETIMEDOUT

@Sadzurami Since version update to 5.1.0 there are no more uncaught errors. Tyvm!