Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client closing function failing when errorHandler is defined, but socket is null. #218

Open
dlancer opened this issue Feb 8, 2022 · 3 comments

Comments

@dlancer
Copy link

dlancer commented Feb 8, 2022

Client closing function failing when errorHandler is defined, but socket is null, e.g. uds transport failed to create for some reason.

TypeError: Cannot read property 'removeListener' of null
^
this.socket.removeListener('error', this.errorHandler);

https://github.com/brightcove/hot-shots/blob/master/lib/statsd.js#L452

@lizzie
Copy link

lizzie commented Apr 25, 2022

got same errors @bdeitte

04/25/2022, 11:11:52  [Unknown] [ERROR] uncaughtException: Cannot read properties of null (reading 'removeListener')
TypeError: Cannot read properties of null (reading 'removeListener')
    at ChildClient.Client._close (/Users/yan.sheng/workspace/modustech/notarize/node_modules/hot-shots/lib/statsd.js:453:17)
    at Timeout.<anonymous> (/Users/yan.sheng/workspace/modustech/notarize/node_modules/hot-shots/lib/statsd.js:419:14)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7)

@batbrain9392
Copy link

Hi! Was wondering if this has been fixed (#227), maybe it can be closed?

@batbrain9392
Copy link

batbrain9392 commented Jul 28, 2023

Unfortunately, we're still facing it in v10.

TypeError Cannot read properties of null (reading 'removeListener')
  at Client._close(/app/node_modules/hot-shots/lib/statsd.js:453:16)
    this.socket.removeListener('error', this.errorHandler);
  at Timeout.<anonymous>(/app/node_modules/hot-shots/lib/statsd.js:419:13)
    this._close(callback);
  at listOnTimeout(node:internal/timers:569:16)
  at process.processTimers(node:internal/timers:512:6)

Is it possible we're missing any implementation detail?
It'd be really helpful if the changelog for this package is made available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants