include additional debug information

This commit is contained in:
Feross Aboukhadijeh 2014-12-17 21:17:58 -08:00
parent 04d50cf021
commit 538bb3e20a

View File

@ -454,14 +454,18 @@ Tracker.prototype._handleResponse = function (requestUrl, data) {
}
var failure = data['failure reason']
if (failure) {
debug('failure from ' + requestUrl + ' (' + failure + ')')
return self.client.emit('warning', new Error(failure))
}
var warning = data['warning message']
if (warning) {
debug('warning from ' + requestUrl + ' (' + warning + ')')
self.client.emit('warning', new Error(warning))
}
debug('response from ' + requestUrl)
if (requestUrl === self._announceUrl) {
var interval = data.interval || data['min interval']
if (interval && !self._opts.interval && self._intervalMs !== 0) {