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

apns2

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apns2 - npm Package Compare versions

Comparing version 9.1.0 to 9.2.0

5

CHANGELOG.md

@@ -7,2 +7,7 @@ # Change Log

## [9.2.0](https://github.com/AndrewBarba/apns2/releases/tag/9.2.0)
1. Allow disabling pingInterval
2. Fix issue with missing ping callback
## [9.1.0](https://github.com/AndrewBarba/apns2/releases/tag/9.1.0)

@@ -9,0 +14,0 @@

17

lib/http2-client.js

@@ -138,4 +138,6 @@ const http2 = require('http2')

client.on('goaway', () => this._closeAndDestroy(client))
if (this._pingIntervalMs) {
this._createPingInterval(client)
}
this._client = client
this._pingInterval = setInterval(() => client.ping(), this._pingIntervalMs).unref()
return client

@@ -145,2 +147,15 @@ }

/**
* Sends a ping on an interval
*
* @private
* @method _createPingInterval
*/
_createPingInterval(client) {
const sendPing = () => {
client.ping(null, () => {})
}
this._pingInterval = setInterval(sendPing, this._pingIntervalMs).unref()
}
/**
* Closes and destorys the existing client. A new client will be created on next request

@@ -147,0 +162,0 @@ *

2

package.json
{
"name": "apns2",
"version": "9.1.0",
"version": "9.2.0",
"description": "Node client for connecting to Apple's Push Notification Service using the new HTTP/2 protocol with JSON web tokens.",

@@ -5,0 +5,0 @@ "author": "Andrew Barba <barba@hey.com>",

@@ -36,3 +36,4 @@ const should = require('should')

signingKey: process.env.APNS_SIGNING_KEY,
defaultTopic: `com.tablelist.Tablelist`
defaultTopic: `com.tablelist.Tablelist`,
pingInterval: 100
})

@@ -39,0 +40,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