Skip to content

Commit df4be8b

Browse files
committed
Improve warnings
1 parent 8f977ee commit df4be8b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

client.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ Tracker.prototype._requestUdp = function (requestUrl, opts) {
300300
if (!stopped) {
301301
error('tracker request timed out')
302302
}
303-
}, stopped ? 1500 : 15000)
303+
}, stopped ? 1500 : 2000)
304304

305305
if (timeout && timeout.unref) {
306306
timeout.unref()
@@ -461,13 +461,13 @@ Tracker.prototype._handleResponse = function (requestUrl, data) {
461461
var failure = data['failure reason']
462462
if (failure) {
463463
debug('failure from ' + requestUrl + ' (' + failure + ')')
464-
return self.client.emit('warning', new Error(failure))
464+
return self.client.emit('warning', new Error(failure + ' (' + requestUrl + ')'))
465465
}
466466

467467
var warning = data['warning message']
468468
if (warning) {
469469
debug('warning from ' + requestUrl + ' (' + warning + ')')
470-
self.client.emit('warning', new Error(warning))
470+
self.client.emit('warning', new Error(warning + ' (' + requestUrl + ')'))
471471
}
472472

473473
debug('response from ' + requestUrl)

0 commit comments

Comments
 (0)