brightcove / hot-shots

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

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

Open Mnkras opened 2 months ago

Mnkras commented 2 months 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 month ago

That makes sense to do