From e3984d6c3f48795db54acc666c804b06aac7272b Mon Sep 17 00:00:00 2001 From: Sir Darkrengarius Date: Sun, 21 Jul 2019 19:36:01 +0300 Subject: [PATCH] Make `acceptChan` buffered --- pkg/app/app_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/app/app_test.go b/pkg/app/app_test.go index 43d5a3d9f4..54759563ac 100644 --- a/pkg/app/app_test.go +++ b/pkg/app/app_test.go @@ -88,7 +88,7 @@ func TestAppAccept(t *testing.T) { lpk, _ := cipher.GenerateKeyPair() rpk, _ := cipher.GenerateKeyPair() in, out := net.Pipe() - app := &App{proto: NewProtocol(in), acceptChan: make(chan [2]routing.Addr), conns: make(map[routing.Loop]io.ReadWriteCloser)} + app := &App{proto: NewProtocol(in), acceptChan: make(chan [2]routing.Addr, 2), conns: make(map[routing.Loop]io.ReadWriteCloser)} go app.handleProto() proto := NewProtocol(out)