Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

apn

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apn - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

test2.js

23

lib/connection.js

@@ -155,6 +155,7 @@ var Errors = require('./errors');

}.bind(this));
this.socket.on('data', this.handleTransmissionError.bind(this));
this.socket.on("drain", this.socketDrained.bind(this));
this.socket.on("error", this.destroyConnection.bind(this));
this.socket.on('clientError', this.errorOccurred.bind(this));
this.socket.on("error", this.errorOccurred.bind(this));
this.socket.on("end", this.restartConnection.bind(this));

@@ -174,2 +175,16 @@ this.socket.once('close', this.restartConnection.bind(this));

*/
Connection.prototype.errorOccurred = function(err) {
debug("Socket error occurred", err);
if(!this.deferredConnection.promise.isResolved()) {
this.deferredConnection.reject(err);
}
else {
this.raiseError(err, null);
}
this.destroyConnection();
};
/**
* @private
*/
Connection.prototype.socketDrained = function() {

@@ -294,3 +309,3 @@ debug("Socket drained");

Connection.prototype.raiseError = function(errorCode, notification) {
debug("Raising error: %d", errorCode, notification);
debug("Raising error:", errorCode, notification);
if (typeof this.options.errorCallback == 'function') {

@@ -374,5 +389,5 @@ this.options.errorCallback(errorCode, notification);

this.raiseError(error, notification);
});
}.bind(this));
};
module.exports = Connection;

2

package.json
{
"name": "apn",
"description": "An interface to the Apple Push Notification service for Node.js",
"version": "1.2.2",
"version": "1.2.3",
"author": "Andrew Naylor <argon@mkbot.net>",

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

@@ -173,2 +173,11 @@ #node-apn

1.2.3:
* Added some more error handling to the connection methods.
* Fixed a problem where an error handler was not bound to the correct context and wouldn't fire.
1.2.2:
* Fixes issue #47, Syntax Error in feedback.js
1.2.1:

@@ -175,0 +184,0 @@

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