mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2025-07-07 01:04:07 +00:00
Remove router.doAdmin and switchTable.doAdmin
This commit is contained in:
@ -278,7 +278,7 @@ func (t *switchTable) blockPeer(port switchPort) {
|
||||
}
|
||||
|
||||
// Removes a peer.
|
||||
// Must be called by the router mainLoop goroutine, e.g. call router.doAdmin with a lambda that calls this.
|
||||
// Must be called by the router actor with a lambda that calls this.
|
||||
// If the removed peer was this node's parent, it immediately tries to find a new parent.
|
||||
func (t *switchTable) forgetPeer(port switchPort) {
|
||||
t.mutex.Lock()
|
||||
@ -866,9 +866,3 @@ func (t *switchTable) _idleIn(port switchPort) {
|
||||
t.idle[port] = time.Now()
|
||||
}
|
||||
}
|
||||
|
||||
// Passed a function to call.
|
||||
// This will send the function to t.admin and block until it finishes.
|
||||
func (t *switchTable) doAdmin(f func()) {
|
||||
phony.Block(t, f)
|
||||
}
|
||||
|
Reference in New Issue
Block a user