From 7a6ca3fb49a4ee7a1010c9c19e724d41c658482c Mon Sep 17 00:00:00 2001 From: Page Fault Date: Sat, 11 Jul 2020 04:32:53 +0000 Subject: [PATCH] fix trojan test --- tunnel/trojan/trojan_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tunnel/trojan/trojan_test.go b/tunnel/trojan/trojan_test.go index 4decaf4..b5c232e 100644 --- a/tunnel/trojan/trojan_test.go +++ b/tunnel/trojan/trojan_test.go @@ -75,9 +75,11 @@ func TestTrojan(t *testing.T) { redir: redirector.NewRedirector(ctx), } go s.acceptLoop() + ctx, cancel = context.WithCancel(ctx) c := &Client{ underlay: tcpClient, ctx: ctx, + cancel: cancel, user: &MockUser{}, }