@superhuman/push-receiver
Advanced tools
+1
-1
| { | ||
| "name": "@superhuman/push-receiver", | ||
| "version": "2.1.2", | ||
| "version": "2.1.3", | ||
| "description": | ||
@@ -5,0 +5,0 @@ "A module to subscribe to GCM/FCM and receive notifications within a node process.", |
+7
-2
@@ -30,3 +30,6 @@ const EventEmitter = require('events'); | ||
| constructor(credentials, { persistentIds, socketTimeout } = {}) { | ||
| constructor( | ||
| credentials, | ||
| { persistentIds, socketTimeout, socketKeepAliveDelay } = {} | ||
| ) { | ||
| super(); | ||
@@ -36,2 +39,3 @@ this._credentials = credentials; | ||
| this._socketTimeout = socketTimeout; | ||
| this._socketKeepAliveDelay = socketKeepAliveDelay; | ||
| this._retryCount = 0; | ||
@@ -82,3 +86,4 @@ this._onSocketConnect = this._onSocketConnect.bind(this); | ||
| this._socket.setKeepAlive(true); | ||
| // Set default keep alive delay to 10s to prevent connection drop in electron v20+ | ||
| this._socket.setKeepAlive(true, this._socketKeepAliveDelay || 10 * 1000); | ||
| this._socket.on('connect', this._onSocketConnect); | ||
@@ -85,0 +90,0 @@ this._socket.on('error', this._onSocketError); |
+2
-1
@@ -10,3 +10,3 @@ const register = require('./register'); | ||
| async function listen(credentials, notificationCallback, options = {}) { | ||
| const { socketTimeout } = options; | ||
| const { socketTimeout, socketKeepAliveDelay } = options; | ||
@@ -38,2 +38,3 @@ if (!credentials) { | ||
| socketTimeout, | ||
| socketKeepAliveDelay, | ||
| }); | ||
@@ -40,0 +41,0 @@ client.on('ON_NOTIFICATION_RECEIVED', notificationCallback); |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
56272
0.47%965
0.63%2
-33.33%