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 4.2.0 to 4.3.0

3

CHANGES.md

@@ -8,2 +8,5 @@ CHANGELOG

## 4.3.0 (2016-9-30)
* @ggoodman Allow socket errors to be handled with errorHandler
## 4.2.0 (2016-8-3)

@@ -10,0 +13,0 @@ * @mhahn Add support for DataDog service checks

@@ -75,2 +75,6 @@ "use strict";

}
if (!options.isChild && options.errorHandler) {
this.socket.on('error', options.errorHandler);
}

@@ -77,0 +81,0 @@ if(options.globalize){

2

package.json
{
"name": "hot-shots",
"description": "Node.js client for StatsD, DogStatsD, and Telegraf",
"version": "4.2.0",
"version": "4.3.0",
"author": "Steve Ivy",

@@ -6,0 +6,0 @@ "contributors": [

@@ -167,5 +167,15 @@ # hot-shots

In the event that there is a socket error, `hot-shots` will allow this error to bubble up. If you would like to catch the errors, just attach a listener to the socket property on the instance.
In the event that there is a socket error, `hot-shots` will allow this error to bubble up unless an `errorHandler` is specified. If you would like to catch the errors, either specify an `errorHandler` in your root client or just attach a listener to the socket property on the instance.
```javascript
// Using errorHandler
var client = new StatsD({
errorHandler: function (error) {
console.log("Socket errors caught here: ", error);
}
})
```
```javascript
// Attaching an error handler to client's socket
client.socket.on('error', function(error) {

@@ -172,0 +182,0 @@ console.error("Error in socket: ", error);

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