mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 14:15:06 +03:00
Reimplement AddPeer and RemovePeer for admin socket (#951)
* Reimplement AddPeer and RemovePeer for admin socket Fix #950 * Disconnect the peer on `removePeer` Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
This commit is contained in:
parent
c922eba2d8
commit
7db934488e
7 changed files with 97 additions and 73 deletions
|
@ -7,7 +7,7 @@ import (
|
|||
func (c *Core) _applyOption(opt SetupOption) {
|
||||
switch v := opt.(type) {
|
||||
case Peer:
|
||||
c.config._peers[v] = struct{}{}
|
||||
c.config._peers[v] = nil
|
||||
case ListenAddress:
|
||||
c.config._listeners[v] = struct{}{}
|
||||
case NodeInfo:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue