small fix

This commit is contained in:
iamqizhao
2015-03-31 10:47:30 -07:00
parent 157f9a16b0
commit 43a92f3fe6

View File

@ -219,6 +219,7 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (_ *Strea
}
if uint32(len(t.activeStreams)) >= t.maxStreams {
t.mu.Unlock()
t.writableChan <- 0
return nil, StreamErrorf(codes.Unavailable, "transport: failed to create new stream because the limit has been reached.")
}
s := t.newStream(ctx, callHdr)