Socket
Socket
Sign inDemoInstall

node-upnp-subscription

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-upnp-subscription - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

tests/whenSubscribingMany.js

24

index.js
"use strict";
let http = require('http');
let portfinder = require('portfinder');
let ip = require('ip');
let util = require('util');
let events = require('events');
let xmlResponseParser = require('parsexmlresponse');
const http = require('http');
const portfinder = require('portfinder');
const ip = require('ip');
const util = require('util');
const events = require('events');
const xmlResponseParser = require('parsexmlresponse');
let httpServerEmitter = new events();
httpServerEmitter.setMaxListeners(100);
let httpServerStarting = false;

@@ -20,5 +22,5 @@ let httpServerStarted = false;

if (httpServerStarting) {
httpServerEmitter.on('started', callback)
httpServerEmitter.once('started', callback)
} else {
httpServerStarting = true
httpServerStarting = true;
portfinder.getPort(function (err, availablePort) {

@@ -92,5 +94,5 @@ httpSubscriptionResponseServer = http.createServer();

subscriptions.delete(sid);
}.bind(this)
}.bind(this);
this.init = function init () {
this.init = function () {
http.request({

@@ -122,3 +124,3 @@ host: host,

events.EventEmitter.call(this);
}.bind(this)
}.bind(this);

@@ -125,0 +127,0 @@ if (!httpServerStarted) {

@@ -9,3 +9,3 @@ {

"description": "Upnp subscription library for Node, handling subscription, renewal and expiry.",
"version": "1.0.5",
"version": "1.0.6",
"main": "index.js",

@@ -17,2 +17,3 @@ "directories": {},

"mocha": "^2.3.4",
"mockery": "^2.0.0",
"nock": "^3.1.1"

@@ -19,0 +20,0 @@ },

@@ -58,5 +58,3 @@ "use strict";

subscription1.on('subscribed', function(payload) {
console.log('subscribed')
sid1 = payload.sid;
callback(null, true);

@@ -67,5 +65,3 @@ });

subscription2.on('subscribed', function(payload) {
console.log('subscribed')
sid2 = payload.sid;
callback(null, true);

@@ -72,0 +68,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