websocket client: fix: emit 'update' when data.complete is 0

This commit is contained in:
Feross Aboukhadijeh 2016-02-29 14:48:59 -08:00
parent 7a0fe31ba5
commit a82f5c9878

View File

@ -166,7 +166,7 @@ WebSocketTracker.prototype._onSocketData = function (data) {
self._trackerId = trackerId
}
if (data.complete) {
if (data.complete != null) {
self.client.emit('update', {
announce: self.announceUrl,
complete: data.complete,