Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
Merge pull request #361 from bergwolf/yamux
Browse files Browse the repository at this point in the history
update grpc-go dependency
  • Loading branch information
bergwolf authored Sep 7, 2018
2 parents ae9d9a8 + 5936600 commit e3eb9ce
Show file tree
Hide file tree
Showing 46 changed files with 2,992 additions and 1,981 deletions.
6 changes: 4 additions & 2 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

[[constraint]]
name = "google.golang.org/grpc"
revision = "5a9f7b402fe85096d2e1d0383435ee1876e863d0"
revision = "d11072e7ca9811b1100b80ca0269ac831f06d024"

[prune]
non-go = true
Expand Down
3 changes: 1 addition & 2 deletions grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
"golang.org/x/sys/unix"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
grpcStatus "google.golang.org/grpc/status"
)
Expand Down Expand Up @@ -756,7 +755,7 @@ func (a *agentGRPC) SignalProcess(ctx context.Context, req *pb.SignalProcessRequ

proc, err := ctr.getProcess(req.ExecId)
if err != nil {
return emptyResp, grpcStatus.Errorf(grpc.Code(err), "Could not signal process: %v", err)
return emptyResp, grpcStatus.Errorf(grpcStatus.Convert(err).Code(), "Could not signal process: %v", err)
}

if err := proc.process.Signal(signal); err != nil {
Expand Down
7 changes: 7 additions & 0 deletions protocols/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ func agentDialer(addr *url.URL, enableYamux bool) dialer {
}

func unixDialer(sock string, timeout time.Duration) (net.Conn, error) {
if strings.HasPrefix(sock, "unix:") {
sock = strings.Trim(sock, "unix:")
}

dialFunc := func() (net.Conn, error) {
return net.DialTimeout("unix", sock, timeout)
}
Expand Down Expand Up @@ -285,6 +289,9 @@ func commonDialer(timeout time.Duration, dialFunc func() (net.Conn, error), time
if !ok {
return nil, timeoutErrMsg
}
case <-t.C:
cancel <- true
return nil, timeoutErrMsg
}

return conn, nil
Expand Down
3 changes: 2 additions & 1 deletion vendor/google.golang.org/grpc/balancer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 23 additions & 3 deletions vendor/google.golang.org/grpc/balancer/balancer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

209 changes: 209 additions & 0 deletions vendor/google.golang.org/grpc/balancer/base/balancer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e3eb9ce

Please sign in to comment.