Socket
Socket
Sign inDemoInstall

hot-shots

Package Overview
Dependencies
Maintainers
1
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hot-shots - npm Package Compare versions

Comparing version 6.1.0 to 6.1.1

6

CHANGES.md
CHANGELOG
=========
## 6.1.1 (2019-1-8)
* @bdeitte Fix errorHandler to only happen again on errors
* @Ithildir Readme fixes
## 6.1.0 (2019-1-5)

@@ -8,3 +12,3 @@ * @bdeitte Ensure close() call always sends data before closing

errors
*@mbellerose Fix the timer function type definition
* @mbellerose Fix the timer function type definition

@@ -11,0 +15,0 @@ ## 6.0.1 (2018-12-17)

12

lib/statsd.js

@@ -333,8 +333,10 @@ const dgram = require('dgram'),

callback(errFormatted);
} else if (this.errorHandler) {
this.errorHandler(errFormatted);
} else if (errFormatted) {
console.log(String(errFormatted));
// emit error ourselves on the socket for backwards compatibility
this.socket.emit('error', errFormatted);
if (this.errorHandler) {
this.errorHandler(errFormatted);
} else {
console.log(String(errFormatted));
// emit error ourselves on the socket for backwards compatibility
this.socket.emit('error', errFormatted);
}
}

@@ -341,0 +343,0 @@ };

{
"name": "hot-shots",
"description": "Node.js client for StatsD, DogStatsD, and Telegraf",
"version": "6.1.0",
"version": "6.1.1",
"author": "Steve Ivy",

@@ -6,0 +6,0 @@ "types": "./types.d.ts",

@@ -42,3 +42,3 @@ # hot-shots

* `telegraf`: Use Telegraf's StatsD line protocol, which is slightly different than the rest `default: false`
* `sampleRate`: Sends only a sample of data to StatsD for all StatsD methods. Can be overriden at the method level. `default: 1`
* `sampleRate`: Sends only a sample of data to StatsD for all StatsD methods. Can be overridden at the method level. `default: 1`
* `errorHandler`: A function with one argument. It is called to handle various errors. `default: none`, errors are thrown/logger to console

@@ -199,5 +199,5 @@ * `useDefaultRoute`: Use the default interface on a Linux system. Useful when running in containers

cases and a console.log message is used in others. An error will only
be explitly thrown when there is a missing callback or if it is some potential configuration issue to be fixed.
be explicitly thrown when there is a missing callback or if it is some potential configuration issue to be fixed.
If you would like ensure all errors are caught, specify an `errorHandler` in your root
If you would like to ensure all errors are caught, specify an `errorHandler` in your root
client. This will catch errors in socket setup, sending of messages,

@@ -204,0 +204,0 @@ and closing of the socket. If you specify an errorHandler and a callback, the callback will take precedence.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc