File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,12 @@ const Swarm = require('./swarm')
2525 * @param {boolean } opts.stats enable web-based statistics? (default: true)
2626 * @param {function } opts.filter black/whitelist fn for disallowing/allowing torrents
2727 */
28- const TEN_MINUTES = 10 * 60 * 1000
28+
29+ // NOTE: Interval gets divided by 5 for websocket trackers,
30+ // so multiply the intended interval by 5const TEN_MINUTES = 10 * 60 * 1000
31+ // Original default was 10 minutes
32+ const MINUTE = 1000 * 60
33+ const defaultInterval = MINUTE * 15 * 5 // Client announce interval, in milliseconds.
2934
3035class Server extends EventEmitter {
3136 constructor ( opts = { } ) {
@@ -50,7 +55,7 @@ class Server extends EventEmitter {
5055 peersCacheTtl
5156 } = opts
5257
53- this . intervalMs = interval || TEN_MINUTES
58+ this . intervalMs = interval || defaultInterval
5459 this . _trustProxy = Boolean ( trustProxy )
5560 this . _filter = filter
5661 this . peersCacheLength = peersCacheLength
You can’t perform that action at this time.
0 commit comments