check up if peer is sourced.

This commit is contained in:
mr
2026-02-20 15:01:01 +01:00
parent 3eae5791a1
commit 572da29fd4
2 changed files with 8 additions and 23 deletions

View File

@@ -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
}