cmd/vendor: update grpc (upstream)

release-3.0
Gyu-Ho Lee 2016-05-12 19:02:30 -07:00
parent f4d1501198
commit 711be0a567
6 changed files with 31 additions and 18 deletions

20
cmd/Godeps/Godeps.json generated
View File

@ -1,7 +1,7 @@
{
"ImportPath": "github.com/coreos/etcd",
"GoVersion": "go1.6",
"GodepVersion": "v62",
"GodepVersion": "v63",
"Packages": [
"./..."
],
@ -209,39 +209,39 @@
},
{
"ImportPath": "google.golang.org/grpc",
"Rev": "b062a3c003c22bfef58fa99d689e6a892b408f9d"
"Rev": "15e50a43c679d14f4f83a83d3177864cfd751cdd"
},
{
"ImportPath": "google.golang.org/grpc/codes",
"Rev": "b062a3c003c22bfef58fa99d689e6a892b408f9d"
"Rev": "15e50a43c679d14f4f83a83d3177864cfd751cdd"
},
{
"ImportPath": "google.golang.org/grpc/credentials",
"Rev": "b062a3c003c22bfef58fa99d689e6a892b408f9d"
"Rev": "15e50a43c679d14f4f83a83d3177864cfd751cdd"
},
{
"ImportPath": "google.golang.org/grpc/grpclog",
"Rev": "b062a3c003c22bfef58fa99d689e6a892b408f9d"
"Rev": "15e50a43c679d14f4f83a83d3177864cfd751cdd"
},
{
"ImportPath": "google.golang.org/grpc/internal",
"Rev": "b062a3c003c22bfef58fa99d689e6a892b408f9d"
"Rev": "15e50a43c679d14f4f83a83d3177864cfd751cdd"
},
{
"ImportPath": "google.golang.org/grpc/metadata",
"Rev": "b062a3c003c22bfef58fa99d689e6a892b408f9d"
"Rev": "15e50a43c679d14f4f83a83d3177864cfd751cdd"
},
{
"ImportPath": "google.golang.org/grpc/naming",
"Rev": "b062a3c003c22bfef58fa99d689e6a892b408f9d"
"Rev": "15e50a43c679d14f4f83a83d3177864cfd751cdd"
},
{
"ImportPath": "google.golang.org/grpc/peer",
"Rev": "b062a3c003c22bfef58fa99d689e6a892b408f9d"
"Rev": "15e50a43c679d14f4f83a83d3177864cfd751cdd"
},
{
"ImportPath": "google.golang.org/grpc/transport",
"Rev": "b062a3c003c22bfef58fa99d689e6a892b408f9d"
"Rev": "15e50a43c679d14f4f83a83d3177864cfd751cdd"
},
{
"ImportPath": "gopkg.in/cheggaaa/pb.v1",

View File

@ -491,7 +491,10 @@ func (cc *Conn) resetTransport(closeTransport bool) error {
return ErrClientConnTimeout
}
closeTransport = false
time.Sleep(sleepTime)
select {
case <-time.After(sleepTime):
case <-cc.shutdownChan:
}
retries++
grpclog.Printf("grpc: Conn.resetTransport failed to create client transport: %v; Reconnecting to %q", err, cc.target)
continue

View File

@ -284,14 +284,11 @@ func checkRecvPayload(pf payloadFormat, recvCompress string, dc Decompressor) er
switch pf {
case compressionNone:
case compressionMade:
if recvCompress == "" {
return transport.StreamErrorf(codes.InvalidArgument, "grpc: invalid grpc-encoding %q with compression enabled", recvCompress)
}
if dc == nil || recvCompress != dc.Type() {
return transport.StreamErrorf(codes.InvalidArgument, "grpc: Decompressor is not installed for grpc-encoding %q", recvCompress)
return transport.StreamErrorf(codes.Unimplemented, "grpc: Decompressor is not installed for grpc-encoding %q", recvCompress)
}
default:
return transport.StreamErrorf(codes.InvalidArgument, "grpc: received unexpected payload format %d", pf)
return transport.StreamErrorf(codes.Internal, "grpc: received unexpected payload format %d", pf)
}
return nil
}

View File

@ -81,7 +81,7 @@ type Stream interface {
// ClientStream defines the interface a client stream has to satify.
type ClientStream interface {
// Header returns the header metedata received from the server if there
// Header returns the header metadata received from the server if there
// is any. It blocks if the metadata is not ready to read.
Header() (metadata.MD, error)
// Trailer returns the trailer metadata from the server. It must be called

View File

@ -289,7 +289,10 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (_ *Strea
}
}
if _, err := wait(ctx, t.shutdownChan, t.writableChan); err != nil {
// t.streamsQuota will be updated when t.CloseStream is invoked.
// Return the quota back now because there is no stream returned to the caller.
if _, ok := err.(StreamError); ok && checkStreamsQuota {
t.streamsQuota.add(1)
}
return nil, err
}
t.mu.Lock()
@ -579,6 +582,11 @@ func (t *http2Client) getStream(f http2.Frame) (*Stream, bool) {
// Window updates will deliver to the controller for sending when
// the cumulative quota exceeds the corresponding threshold.
func (t *http2Client) updateWindow(s *Stream, n uint32) {
s.mu.Lock()
defer s.mu.Unlock()
if s.state == streamDone {
return
}
if w := t.fc.onRead(n); w > 0 {
t.controlBuf.put(&windowUpdate{0, w})
}

View File

@ -303,6 +303,11 @@ func (t *http2Server) getStream(f http2.Frame) (*Stream, bool) {
// Window updates will deliver to the controller for sending when
// the cumulative quota exceeds the corresponding threshold.
func (t *http2Server) updateWindow(s *Stream, n uint32) {
s.mu.Lock()
defer s.mu.Unlock()
if s.state == streamDone {
return
}
if w := t.fc.onRead(n); w > 0 {
t.controlBuf.put(&windowUpdate{0, w})
}