Skip to content

Commit e31c04c

Browse files
committed
Update: rebase
1 parent ac2d5d0 commit e31c04c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/driveWatcher.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ class DriveWatcher extends EventEmitter {
5353
var peers = 0
5454
for (const [path, drive] of this.drivesByPath) {
5555
const driveStats = await drive.stats()
56-
for (const { path, metadata } of driveStats.stats) {
57-
if (path !== '/') continue
58-
downloaded += metadata.downloadedBlocks
59-
total += metadata.totalBlocks
60-
peers = metadata.peers
56+
for (const { path, content } of driveStats.stats) {
57+
if (path !== '/' || !content) continue
58+
downloaded += content.downloadedBlocks
59+
total += content.totalBlocks
60+
peers = content.peers
6161
}
6262
}
6363
this.emit('stats', { total, downloaded, peers })

0 commit comments

Comments
 (0)