Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -1726,24 +1726,30 @@ type serverStream struct {

sendCompressorName string

recvFirstMsg bool // set after the first message is received

maxReceiveMessageSize int
maxSendMessageSize int
trInfo *traceInfo

// mu guards trInfo.tr after the service handler runs.
mu sync.Mutex
trInfo *traceInfo

statsHandler stats.Handler

binlogs []binarylog.MethodLogger

// Bool fields are grouped at the tail to eliminate the alignment padding
// that would otherwise follow each bool when the next field is pointer- or
// int-sized. See https://github.com/grpc/grpc-go/issues/9349 for benchmarks.
// Add new bool fields here, not inline above.

recvFirstMsg bool // set after the first message is received
// serverHeaderBinlogged indicates whether server header has been logged. It
// will happen when one of the following two happens: stream.SendHeader(),
// stream.Send().
//
// It's only checked in send and sendHeader, doesn't need to be
// synchronized.
serverHeaderBinlogged bool

mu sync.Mutex // protects trInfo.tr after the service handler runs.
}

func (ss *serverStream) Context() context.Context {
Expand Down
Loading