remove debugging info

This commit is contained in:
iamqizhao 2016-07-13 18:13:28 -07:00
parent 6205cb25ab
commit 48068bbe62
3 changed files with 1 additions and 13 deletions

View File

@ -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) {

View File

@ -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()

View File

@ -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.
)