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) { func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transport.Stream, srv *service, sd *StreamDesc, trInfo *traceInfo) (err error) {
ss := &serverStream{ ss := &serverStream{
t: t, t: t,
s: stream, s: stream,
p: &parser{s: stream}, p: &parser{s: stream},
codec: s.opts.codec, codec: s.opts.codec,
trInfo: trInfo, trInfo: trInfo,
} }
if trInfo != nil { if trInfo != nil {

View File

@ -298,7 +298,7 @@ type serverStream struct {
codec Codec codec Codec
statusCode codes.Code statusCode codes.Code
statusDesc string statusDesc string
trInfo *traceInfo trInfo *traceInfo
mu sync.Mutex // protects trInfo.tr after the service handler runs. 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 var buf bytes.Buffer
t := &http2Server{ t := &http2Server{
conn: conn, conn: conn,
authInfo: authInfo, authInfo: authInfo,
framer: framer, framer: framer,
hBuf: &buf, hBuf: &buf,
hEnc: hpack.NewEncoder(&buf), hEnc: hpack.NewEncoder(&buf),
maxStreams: maxStreams, maxStreams: maxStreams,
controlBuf: newRecvBuffer(), controlBuf: newRecvBuffer(),
fc: &inFlow{limit: initialConnWindowSize}, fc: &inFlow{limit: initialConnWindowSize},
sendQuotaPool: newQuotaPool(defaultWindowSize), sendQuotaPool: newQuotaPool(defaultWindowSize),
//tracing: tracing, //tracing: tracing,
state: reachable, state: reachable,
writableChan: make(chan int, 1), writableChan: make(chan int, 1),