mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-01-18 12:11:36 +00:00
Error.message is read only on some platforms.
This causes another Error to be thrown.
This commit is contained in:
parent
7ec91ebecc
commit
29d2e6b1b3
@ -130,7 +130,11 @@ class UDPTracker extends Tracker {
|
||||
cleanup()
|
||||
if (self.destroyed) return
|
||||
|
||||
if (err.message) err.message += ` (${self.announceUrl})`
|
||||
try {
|
||||
// Error.message is readonly on some platforms.
|
||||
if (err.message) err.message += ` (${self.announceUrl})`
|
||||
} catch (ignored) {
|
||||
}
|
||||
// errors will often happen if a tracker is offline, so don't treat it as fatal
|
||||
self.client.emit('warning', err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user