diff --git a/lib/client/udp-tracker.js b/lib/client/udp-tracker.js index 2402dbf..d16427d 100644 --- a/lib/client/udp-tracker.js +++ b/lib/client/udp-tracker.js @@ -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) }