This commit is contained in:
iamqizhao 2015-10-05 17:52:00 -07:00
parent bc49d12737
commit 9db3ca85c7
3 changed files with 14 additions and 14 deletions

View File

@ -397,10 +397,10 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transport.Stream, srv *service, sd *StreamDesc, trInfo *traceInfo) (err error) {
ss := &serverStream{
t: t,
s: stream,
p: &parser{s: stream},
codec: s.opts.codec,
t: t,
s: stream,
p: &parser{s: stream},
codec: s.opts.codec,
trInfo: trInfo,
}
if trInfo != nil {

View File

@ -298,7 +298,7 @@ type serverStream struct {
codec Codec
statusCode codes.Code
statusDesc string
trInfo *traceInfo
trInfo *traceInfo
mu sync.Mutex // protects trInfo.tr after the service handler runs.
}

View File

@ -117,15 +117,15 @@ func newHTTP2Server(conn net.Conn, maxStreams uint32, authInfo credentials.AuthI
}
var buf bytes.Buffer
t := &http2Server{
conn: conn,
authInfo: authInfo,
framer: framer,
hBuf: &buf,
hEnc: hpack.NewEncoder(&buf),
maxStreams: maxStreams,
controlBuf: newRecvBuffer(),
fc: &inFlow{limit: initialConnWindowSize},
sendQuotaPool: newQuotaPool(defaultWindowSize),
conn: conn,
authInfo: authInfo,
framer: framer,
hBuf: &buf,
hEnc: hpack.NewEncoder(&buf),
maxStreams: maxStreams,
controlBuf: newRecvBuffer(),
fc: &inFlow{limit: initialConnWindowSize},
sendQuotaPool: newQuotaPool(defaultWindowSize),
//tracing: tracing,
state: reachable,
writableChan: make(chan int, 1),