(key NoisePublicKey)
| 365 | } |
| 366 | |
| 367 | func (device *Device) RemovePeer(key NoisePublicKey) { |
| 368 | device.peers.Lock() |
| 369 | defer device.peers.Unlock() |
| 370 | // stop peer and remove from routing |
| 371 | |
| 372 | peer, ok := device.peers.keyMap[key] |
| 373 | if ok { |
| 374 | removePeerLocked(device, peer, key) |
| 375 | } |
| 376 | } |
| 377 | |
| 378 | func (device *Device) RemoveAllPeers() { |
| 379 | device.peers.Lock() |
no test coverage detected