@@ -44,7 +44,7 @@ Swarm.prototype.scrape = function (params, cb) {
4444Swarm . 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) {
7272Swarm . 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) {
8787Swarm . 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