diversario/node-ssdp

Exception while stoping

Closed this issue · 0 comments

vf1 commented

The advertise() checks this.sock, but stop() does not null it.

SSDP.prototype.advertise = function (alive) {
  var self = this

  if (!this.sock) return
  if (alive === undefined) alive = true
...
SSDP.prototype.stop = function () {
  this.advertise(false)
  this.advertise(false)
  this.sock.close()
  this.sock = null  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< changes
}