Skip to content

Commit

Permalink
Numwant (rtc peers) default of 4.
Browse files Browse the repository at this point in the history
  • Loading branch information
chr15m committed Sep 4, 2018
1 parent 0c9eea3 commit 3582d30
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ function Bugout(identifier, opts) {
var opts = opts || {};
if (!(this instanceof Bugout)) return new Bugout(identifier, opts);

this.wt = opts.wt || new WebTorrent(opts.iceServers ? {tracker: {rtcConfig: {iceServers: opts.iceServers}}} : null);
var trackeropts = opts.tracker || {};
trackeropts.getAnnounceOpts = trackeropts.getAnnounceOpts || function() { return {numwant: 4}; };
if (opts.iceServers) {
trackeropts.rtcConfig = {iceServers: opts.iceServers};
}
this.wt = opts.wt || new WebTorrent({tracker: trackeropts});
this.nacl = nacl;

if (opts["seed"]) {
Expand Down

0 comments on commit 3582d30

Please sign in to comment.