File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed
Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -35,12 +35,11 @@ import (
3535const loggerName = "hive"
3636
3737const (
38- protocolName = "hive"
39- protocolVersion = "1.1.0"
40- peersStreamName = "peers"
41- messageTimeout = 1 * time .Minute // maximum allowed time for a message to be read or written.
42- maxBatchSize = 30
43- batchValidationTimeout = 5 * time .Minute // prevent lock contention on peer validation
38+ protocolName = "hive"
39+ protocolVersion = "1.1.0"
40+ peersStreamName = "peers"
41+ messageTimeout = 1 * time .Minute // maximum allowed time for a message to be read or written.
42+ maxBatchSize = 30
4443)
4544
4645var (
@@ -261,16 +260,14 @@ func (s *Service) startCheckPeersHandler() {
261260 return
262261 case newPeers := <- s .peersChan :
263262 s .wg .Go (func () {
264- cctx , cancel := context .WithTimeout (ctx , batchValidationTimeout )
265- defer cancel ()
266- s .checkAndAddPeers (cctx , newPeers )
263+ s .checkAndAddPeers (newPeers )
267264 })
268265 }
269266 }
270267 })
271268}
272269
273- func (s * Service ) checkAndAddPeers (ctx context. Context , peers pb.Peers ) {
270+ func (s * Service ) checkAndAddPeers (peers pb.Peers ) {
274271 var peersToAdd []swarm.Address
275272
276273 for _ , p := range peers .Peers {
You can’t perform that action at this time.
0 commit comments