Close halt sync connection
()
| 209 | |
| 210 | //Close halt sync connection |
| 211 | func (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 |
| 222 | func (this *Peer) GetID() uint64 { |