Skip to content

Commit

Permalink
Remove unnecessary function handleStreamSuspension (#1468)
Browse files Browse the repository at this point in the history
  • Loading branch information
dfawley authored Aug 25, 2017
1 parent e98913e commit fa59b77
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions transport/transport_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
})
Expand Down

0 comments on commit fa59b77

Please sign in to comment.