MCPcopy Create free account
hub / github.com/DNAProject/DNA / addToRetryList

Method addToRetryList

p2pserver/p2pserver.go:545–556  ·  view source on GitHub ↗

addToRetryList add retry address to ReconnectAddrs

(addr string)

Source from the content-addressed store, hash-verified

543
544//addToRetryList add retry address to ReconnectAddrs
545func (this *P2PServer) addToRetryList(addr string) {
546 this.ReconnectAddrs.Lock()
547 defer this.ReconnectAddrs.Unlock()
548 if this.RetryAddrs == nil {
549 this.RetryAddrs = make(map[string]int)
550 }
551 if _, ok := this.RetryAddrs[addr]; ok {
552 delete(this.RetryAddrs, addr)
553 }
554 //alway set retry to 0
555 this.RetryAddrs[addr] = 0
556}
557
558//removeFromRetryList remove connected address from ReconnectAddrs
559func (this *P2PServer) removeFromRetryList(addr string) {

Callers 1

retryInactivePeerMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected