diff --git a/test/end2end_test.go b/test/end2end_test.go index 2f4e8e8ec..c2404f242 100644 --- a/test/end2end_test.go +++ b/test/end2end_test.go @@ -91,7 +91,7 @@ var raceMode bool // set by race_test.go in race mode type testServer struct { security string // indicate the authentication protocol used by this server. - earlyFail bool // whether to error out the execution of a service handler. + earlyFail bool // whether to error out the execution of a service handler prematurely. } func (s *testServer) EmptyCall(ctx context.Context, in *testpb.Empty) (*testpb.Empty, error) { diff --git a/transport/http2_client.go b/transport/http2_client.go index bede3d39b..3f1ef2a5f 100644 --- a/transport/http2_client.go +++ b/transport/http2_client.go @@ -600,11 +600,7 @@ func (t *http2Client) Write(s *Stream, data []byte, opts *Options) error { } s.mu.Lock() if s.state != streamDone { - //if s.state == streamReadDone { - // s.state = streamDone - //} else { s.state = streamWriteDone - //} } s.mu.Unlock() return nil @@ -680,13 +676,6 @@ func (t *http2Client) handleData(f *http2.DataFrame) { if f.FrameHeader.Flags.Has(http2.FlagDataEndStream) { s.mu.Lock() s.state = streamDone - /* - if s.state == streamWriteDone { - s.state = streamDone - } else { - s.state = streamReadDone - } - */ s.statusCode = codes.Internal s.statusDesc = "server closed the stream without sending trailers" s.mu.Unlock() diff --git a/transport/transport.go b/transport/transport.go index cb739886f..db0de3a6a 100644 --- a/transport/transport.go +++ b/transport/transport.go @@ -165,7 +165,6 @@ type streamState uint8 const ( streamActive streamState = iota streamWriteDone // EndStream sent - streamReadDone // EndStream received streamDone // sendDone and recvDone or RSTStreamFrame is sent or received. )