From fa59b779e8729b2ae0d0cfca12a91220f690fa6f Mon Sep 17 00:00:00 2001 From: dfawley Date: Fri, 25 Aug 2017 13:51:53 -0700 Subject: [PATCH] Remove unnecessary function handleStreamSuspension (#1468) --- transport/transport_test.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/transport/transport_test.go b/transport/transport_test.go index be2d8dad..6b7d6b8c 100644 --- a/transport/transport_test.go +++ b/transport/transport_test.go @@ -116,13 +116,6 @@ func (h *testStreamHandler) handleStreamPingPong(t *testing.T, s *Stream) { } } -// handleStreamSuspension blocks until s.ctx is canceled. -func (h *testStreamHandler) handleStreamSuspension(s *Stream) { - go func() { - <-s.ctx.Done() - }() -} - func (h *testStreamHandler) handleStreamMisbehave(t *testing.T, s *Stream) { conn, ok := s.ServerTransport().(*http2Server) if !ok { @@ -260,7 +253,7 @@ func (s *server) start(t *testing.T, port int, serverConfig *ServerConfig, ht hT h := &testStreamHandler{transport.(*http2Server)} switch ht { case suspended: - go transport.HandleStreams(h.handleStreamSuspension, + go transport.HandleStreams(func(*Stream) {}, // Do nothing to handle the stream. func(ctx context.Context, method string) context.Context { return ctx })