mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-16 07:16:38 +00:00
Remove Wireguard peer in no-proxy mode on Close (#247)
When connection is closed the wireguard peer should be gone. It wasn't happening until this fix.
This commit is contained in:
@@ -21,7 +21,10 @@ func NewNoProxy(config Config) *NoProxy {
|
||||
}
|
||||
|
||||
func (p *NoProxy) Close() error {
|
||||
// noop
|
||||
err := p.config.WgInterface.RemovePeer(p.config.RemoteKey)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user