Skip to content

Commit 5aa0696

Browse files
committed
fix crash, oops
1 parent 69e8528 commit 5aa0696

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/swarm.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Swarm.prototype.scrape = function (params, cb) {
4444
Swarm.prototype._onAnnounceStarted = function (params, peer) {
4545
if (peer) {
4646
debug('unexpected `started` event from peer that is already in swarm')
47-
return this._onAnnounce_update(params, peer) // treat as an update
47+
return this._onAnnounceUpdate(params, peer) // treat as an update
4848
}
4949

5050
if (params.left === 0) this.complete += 1
@@ -72,7 +72,7 @@ Swarm.prototype._onAnnounceStopped = function (params, peer) {
7272
Swarm.prototype._onAnnounceCompleted = function (params, peer) {
7373
if (!peer) {
7474
debug('unexpected `completed` event from peer that is not in swarm')
75-
return this._onAnnounce_started(params, peer) // treat as a start
75+
return this._onAnnounceStarted(params, peer) // treat as a start
7676
}
7777
if (peer.complete) {
7878
debug('unexpected `completed` event from peer that is already marked as completed')
@@ -87,7 +87,7 @@ Swarm.prototype._onAnnounceCompleted = function (params, peer) {
8787
Swarm.prototype._onAnnounceUpdate = function (params, peer) {
8888
if (!peer) {
8989
debug('unexpected `update` event from peer that is not in swarm')
90-
return this._onAnnounce_started(params, peer) // treat as a start
90+
return this._onAnnounceStarted(params, peer) // treat as a start
9191
}
9292

9393
if (!peer.complete && params.left === 0) {

0 commit comments

Comments
 (0)