mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-01-18 20:21:36 +00:00
Merge pull request #197 from feross/fewer-offers
ws client: Don't include offers with 'completed' event
This commit is contained in:
commit
9d5b55b498
@ -60,8 +60,8 @@ WebSocketTracker.prototype.announce = function (opts) {
|
||||
})
|
||||
if (self._trackerId) params.trackerid = self._trackerId
|
||||
|
||||
if (opts.event === 'stopped') {
|
||||
// Don't include offers with 'stopped' event
|
||||
if (opts.event === 'stopped' || opts.event === 'completed') {
|
||||
// Don't include offers with 'stopped' or 'completed' event
|
||||
self._send(params)
|
||||
} else {
|
||||
// Limit the number of offers that are generated, since it can be slow
|
||||
|
Loading…
Reference in New Issue
Block a user