diff --git a/client/internal/engine.go b/client/internal/engine.go index c81b1321074..bdc05ea69b3 100644 --- a/client/internal/engine.go +++ b/client/internal/engine.go @@ -259,7 +259,7 @@ func (e *Engine) Start() error { } e.ctx, e.cancel = context.WithCancel(e.clientCtx) - e.wgProxyFactory = wgproxy.NewFactory(e.clientCtx, e.config.WgPort) + e.wgProxyFactory = wgproxy.NewFactory(e.ctx, e.config.WgPort) wgIface, err := e.newWgIface() if err != nil { diff --git a/client/internal/wgproxy/proxy_ebpf.go b/client/internal/wgproxy/proxy_ebpf.go index 01e8766e82e..bbd00d6e285 100644 --- a/client/internal/wgproxy/proxy_ebpf.go +++ b/client/internal/wgproxy/proxy_ebpf.go @@ -109,7 +109,6 @@ func (p *WGEBPFProxy) AddTurnConn(turnConn net.Conn) (net.Addr, error) { // CloseConn doing nothing because this type of proxy implementation does not store the connection func (p *WGEBPFProxy) CloseConn() error { - p.cancel() return nil }