mirror of
https://github.com/netbirdio/netbird.git
synced 2025-08-17 10:31:45 +02:00
Fix error when removing peer conn (#264)
When stopping engine, all peer conns have to be closed and for each peer WireGuard iface is called to remove WireGuard peer. This operation happens in a goroutine causing Engine to remove the whole WireGuard interface before. Therefore consequent calls to RemovePeer are unsuccessful. This fix just adds a small delay before removing interface.
This commit is contained in:
@ -153,7 +153,7 @@ func (conn *Conn) Open() error {
|
||||
defer func() {
|
||||
err := conn.cleanup()
|
||||
if err != nil {
|
||||
log.Errorf("error while cleaning up peer connection %s: %v", conn.config.Key, err)
|
||||
log.Warnf("error while cleaning up peer connection %s: %v", conn.config.Key, err)
|
||||
return
|
||||
}
|
||||
}()
|
||||
|
Reference in New Issue
Block a user