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

Method Close

p2pserver/peer/peer.go:211–219  ·  view source on GitHub ↗

Close halt sync connection

()

Source from the content-addressed store, hash-verified

209
210//Close halt sync connection
211func (this *Peer) Close() {
212 this.SetState(common.INACTIVITY)
213 conn := this.Link.GetConn()
214 this.connLock.Lock()
215 if conn != nil {
216 conn.Close()
217 }
218 this.connLock.Unlock()
219}
220
221//GetID return peer`s id
222func (this *Peer) GetID() uint64 {

Callers

nothing calls this directly

Calls 3

SetStateMethod · 0.95
GetConnMethod · 0.80
CloseMethod · 0.65

Tested by

no test coverage detected