Skip to content

Commit

Permalink
fix: log SSDP errors (#85)
Browse files Browse the repository at this point in the history
The process can crash if there's no error listener so log any SSDP
errors.
  • Loading branch information
achingbrain authored Dec 17, 2024
1 parent 7a296bd commit 37bb8ca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/upnp/discovery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ export async function * discoverGateways (options?: DiscoverOptions): AsyncGener
log.trace('<- Incoming from %s:%s', isIPv6(remote.address) ? `[${remote.address}]` : remote.address, remote.port)
log.trace('%s', message)
})
discovery.on('error', (err) => {
log.error('SSDP error - %e', err)
})

log('searching for gateways')

Expand Down

0 comments on commit 37bb8ca

Please sign in to comment.