Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'index.js')
-rw-r--r--index.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/index.js b/index.js
index 31c318b..e7b56a8 100644
--- a/index.js
+++ b/index.js
@@ -15,7 +15,7 @@ const Peer = require('simple-peer')
const queueMicrotask = require('queue-microtask')
const randombytes = require('randombytes')
const sha1 = require('simple-sha1')
-const speedometer = require('speedometer')
+const throughput = require('throughput')
const { ThrottleGroup } = require('speed-limiter')
const ConnPool = require('./lib/conn-pool.js') // browser exclude
const Torrent = require('./lib/torrent.js')
@@ -115,8 +115,8 @@ class WebTorrent extends EventEmitter {
}
// stats
- this._downloadSpeed = speedometer()
- this._uploadSpeed = speedometer()
+ this._downloadSpeed = throughput()
+ this._uploadSpeed = throughput()
if (opts.dht !== false && typeof DHT === 'function' /* browser exclude */) {
// use a single DHT instance for all torrents, so the routing table can be reused