mirror of
https://github.com/netbirdio/netbird.git
synced 2025-08-18 19:09:09 +02:00
Fix stop not cleaning up WireGuard interface (#286)
This commit is contained in:
committed by
GitHub
parent
a15d52b263
commit
2aaeeac7f6
@@ -2,12 +2,13 @@ package cmd
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/wiretrustee/wiretrustee/util"
|
||||
"net"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/wiretrustee/wiretrustee/util"
|
||||
|
||||
clientProto "github.com/wiretrustee/wiretrustee/client/proto"
|
||||
client "github.com/wiretrustee/wiretrustee/client/server"
|
||||
mgmtProto "github.com/wiretrustee/wiretrustee/management/proto"
|
||||
@@ -85,7 +86,6 @@ func startManagement(t *testing.T, config *mgmt.Config) (*grpc.Server, net.Liste
|
||||
|
||||
func startClientDaemon(
|
||||
t *testing.T, ctx context.Context, managementURL, configPath string,
|
||||
stopCh chan int, cleanupCh chan<- struct{},
|
||||
) (*grpc.Server, net.Listener) {
|
||||
lis, err := net.Listen("tcp", "127.0.0.1:0")
|
||||
if err != nil {
|
||||
@@ -93,13 +93,7 @@ func startClientDaemon(
|
||||
}
|
||||
s := grpc.NewServer()
|
||||
|
||||
server := client.New(
|
||||
ctx,
|
||||
managementURL,
|
||||
configPath,
|
||||
stopCh,
|
||||
cleanupCh,
|
||||
)
|
||||
server := client.New(ctx, managementURL, configPath)
|
||||
if err := server.Start(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user