File tree 2 files changed +4
-2
lines changed
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,9 @@ Options include:
73
73
// Supports suggested-IP to avoid DNS calls: [suggested-IP@]<host>:<port>
74
74
bootstrap: [' host:port' ],
75
75
keyPair, // set the default key pair to use for server.listen and connect
76
- connectionKeepAlive // set a default keep-alive (in ms) on all opened sockets. Defaults to 5000. Set false to turn off (advanced usage).
76
+ connectionKeepAlive, // set a default keep-alive (in ms) on all opened sockets. Defaults to 5000. Set false to turn off (advanced usage).
77
+ randomPunchInterval: 20000 // set a default time for interval between punches (in ms). Defaults to 20000.
78
+
77
79
}
78
80
```
79
81
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ class HyperDHT extends DHT {
42
42
this . _validatedLocalAddresses = new Map ( )
43
43
44
44
this . _lastRandomPunch = 0
45
- this . _randomPunchInterval = 20000 // min 20s between random punches...
45
+ this . _randomPunchInterval = opts . randomPunchInterval || 20000 // min 20s between random punches...
46
46
this . _randomPunches = 0
47
47
this . _randomPunchLimit = 1 // set to one for extra safety for now
48
48
You can’t perform that action at this time.
0 commit comments