diff --git a/server.js b/server.js index 3723516..419073b 100644 --- a/server.js +++ b/server.js @@ -280,6 +280,8 @@ function Server (opts) { } } +Server.Swarm = Swarm + Server.prototype._onError = function (err) { var self = this self.emit('error', err) @@ -352,7 +354,7 @@ Server.prototype.createSwarm = function (infoHash, cb) { if (Buffer.isBuffer(infoHash)) infoHash = infoHash.toString('hex') process.nextTick(function () { - var swarm = self.torrents[infoHash] = new Swarm(infoHash, self) + var swarm = self.torrents[infoHash] = new Server.Swarm(infoHash, self) cb(null, swarm) }) }