brightcove / hot-shots

Node.js client for statsd, DogStatsD, and Telegraf
MIT License
525 stars 134 forks source link

client.close() throws errors when `mock: true` is set #273

Open Mnkras opened 2 weeks ago

Mnkras commented 2 weeks ago

With mock: true my understanding is no metrics will be emitted and metrics just end up in a local buffer.

When calling client.close() it attempts to create a socket, and if it can't connect will spew errors. I think if mock: true is set , it should just return.

Thoughts?

bdeitte commented 1 week ago

That makes sense to do