mirror of
https://github.com/netbirdio/netbird.git
synced 2025-06-26 20:52:52 +02: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:
parent
b72ed91cb4
commit
430e0415df
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user