From b0115cebf74ebf58f5b268b8d0e12f978622e4a8 Mon Sep 17 00:00:00 2001 From: Nikita Kryuchkov Date: Thu, 12 Dec 2019 23:22:49 +0300 Subject: [PATCH] Fix linter error --- pkg/router/route_group_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/router/route_group_test.go b/pkg/router/route_group_test.go index d8a3a42c9a..719a611538 100644 --- a/pkg/router/route_group_test.go +++ b/pkg/router/route_group_test.go @@ -465,17 +465,18 @@ func pushPackets(ctx context.Context, t *testing.T, from *transport.Manager, to panic("malformed packet") } - if safeSend(to, ctx, payload) { + if safeSend(ctx, to, payload) { return } } } } -func safeSend(to *RouteGroup, ctx context.Context, payload []byte) (interrupt bool) { +func safeSend(ctx context.Context, to *RouteGroup, payload []byte) (interrupt bool) { defer func() { if r := recover(); r != nil { - interrupt = r != "send on closed channel" // TODO: come up with idea how to handle this case + // TODO: come up with idea how to get rid of panic + interrupt = r != "send on closed channel" } }()