Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function probe (mdns, service, cb) {
// just silently ignore it and retry as we normally would
sent = true
timer = setTimeout(++retries < 3 ? send : done, 250)
timer.unref()
timer.unref && timer.unref();
})
}

Expand Down Expand Up @@ -146,7 +146,7 @@ function announce (server, service) {
}
delay = delay * REANNOUNCE_FACTOR
if (delay < REANNOUNCE_MAX_MS && !service._destroyed) {
setTimeout(broadcast, delay).unref()
setTimeout(broadcast, delay).unref && setTimeout(broadcast, delay).unref();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will call the function broadcast twice in Node.

}
})
})()
Expand Down