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

Method RemoveFromConnectingList

p2pserver/net/netserver/netserver.go:443–448  ·  view source on GitHub ↗

Remove the peer from connecting list if the connection is established

(addr string)

Source from the content-addressed store, hash-verified

441
442//Remove the peer from connecting list if the connection is established
443func (this *NetServer) RemoveFromConnectingList(addr string) {
444 this.connectingNodes.Lock()
445 defer this.connectingNodes.Unlock()
446 this.connectingNodes.ConnectingAddrs.Delete(addr)
447 log.Trace("[p2p]remove from out connecting list", addr)
448}
449
450//record the peer which is going to be dialed and sent version message but not in establish state
451func (this *NetServer) GetOutConnectingListLen() (count uint) {

Callers 2

ConnectMethod · 0.95
TestConnectingNodeAPIFunction · 0.95

Calls 2

TraceFunction · 0.92
DeleteMethod · 0.65

Tested by 1

TestConnectingNodeAPIFunction · 0.76