check up if peer is sourced.
This commit is contained in:
@@ -367,26 +367,6 @@ func ConnectToIndexers(h host.Host, minIndexer int, maxIndexer int, myPID pp.ID)
|
||||
logger.Err(err)
|
||||
continue
|
||||
}
|
||||
/*for _, proto := range []protocol.ID{ProtocolPublish, ProtocolGet, ProtocolHeartbeat} {
|
||||
if stream, err := TempStream(h, *ad, proto); err == nil {
|
||||
StreamMuIndexes.Lock()
|
||||
if StreamIndexers[proto] == nil {
|
||||
StreamIndexers[proto] = map[pp.ID]*Stream{}
|
||||
}
|
||||
time.AfterFunc(2*time.Second, func() {
|
||||
StreamMuIndexes.Lock()
|
||||
defer StreamMuIndexes.Unlock()
|
||||
delete(StreamIndexers[proto], ad.ID)
|
||||
})
|
||||
StreamIndexers[proto][ad.ID] = &Stream{
|
||||
Stream: stream,
|
||||
Expiry: time.Now().UTC().Add(2 * time.Second),
|
||||
}
|
||||
StreamMuIndexes.Unlock()
|
||||
} else {
|
||||
continue
|
||||
}
|
||||
}*/
|
||||
StaticIndexers[indexerAddr] = ad
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user