From 7fd45a6b67ba0c58c48c73d62dd084ecab936247 Mon Sep 17 00:00:00 2001 From: James Phillips Date: Mon, 7 Aug 2017 16:35:57 -0700 Subject: [PATCH] Propagates a better error message from memberlist. Fixes #3312. --- vendor/github.com/hashicorp/memberlist/memberlist.go | 8 ++++---- vendor/vendor.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/vendor/github.com/hashicorp/memberlist/memberlist.go b/vendor/github.com/hashicorp/memberlist/memberlist.go index 9ea195cfc..db0284533 100644 --- a/vendor/github.com/hashicorp/memberlist/memberlist.go +++ b/vendor/github.com/hashicorp/memberlist/memberlist.go @@ -116,19 +116,19 @@ func newMemberlist(conf *Config) (*Memberlist, error) { // See comment below for details about the retry in here. makeNetRetry := func(limit int) (*NetTransport, error) { + var err error for try := 0; try < limit; try++ { - nt, err := NewNetTransport(nc) - if err == nil { + var nt *NetTransport + if nt, err = NewNetTransport(nc); err == nil { return nt, nil } - if strings.Contains(err.Error(), "address already in use") { logger.Printf("[DEBUG] Got bind error: %v", err) continue } } - return nil, fmt.Errorf("ran out of tries to obtain an address") + return nil, fmt.Errorf("failed to obtain an address: %v", err) } // The dynamic bind port operation is inherently racy because diff --git a/vendor/vendor.json b/vendor/vendor.json index 82b254f0e..387ededb8 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -55,7 +55,7 @@ {"checksumSHA1":"kqCMCHy2b+RBMKC+ER+OPqp8C3E=","path":"github.com/hashicorp/hil","revision":"1e86c6b523c55d1fa6c6e930ce80b548664c95c2","revisionTime":"2016-07-11T23:18:37Z"}, {"checksumSHA1":"UICubs001+Q4MsUf9zl2vcMzWQQ=","path":"github.com/hashicorp/hil/ast","revision":"1e86c6b523c55d1fa6c6e930ce80b548664c95c2","revisionTime":"2016-07-11T23:18:37Z"}, {"checksumSHA1":"vt+P9D2yWDO3gdvdgCzwqunlhxU=","path":"github.com/hashicorp/logutils","revision":"0dc08b1671f34c4250ce212759ebd880f743d883","revisionTime":"2015-06-09T07:04:31Z"}, - {"checksumSHA1":"zcZtXfxrusJpcaPeGJOBnPG1xjs=","path":"github.com/hashicorp/memberlist","revision":"99594a4f171a77cb7cff01f143ccf608ac577c47","revisionTime":"2017-07-17T19:31:21Z"}, + {"checksumSHA1":"ALN/cUj3330lnFRKFE3G58Z8p+E=","path":"github.com/hashicorp/memberlist","revision":"ea4ef7f066304a8e6f28bdb958888fe899f3b44e","revisionTime":"2017-08-07T23:34:30Z"}, {"checksumSHA1":"qnlqWJYV81ENr61SZk9c65R1mDo=","path":"github.com/hashicorp/net-rpc-msgpackrpc","revision":"a14192a58a694c123d8fe5481d4a4727d6ae82f3","revisionTime":"2015-11-16T02:03:38Z"}, {"checksumSHA1":"5GHIYEtOr1rsHOZUac6RA/82d3I=","path":"github.com/hashicorp/raft","revision":"0a6e1b039ba3d8057e9f16c919d2afb813884f74","revisionTime":"2017-08-04T15:11:58Z","version":"library-v2-stage-one","versionExact":"library-v2-stage-one"}, {"checksumSHA1":"QAxukkv54/iIvLfsUP6IK4R0m/A=","path":"github.com/hashicorp/raft-boltdb","revision":"d1e82c1ec3f15ee991f7cc7ffd5b67ff6f5bbaee","revisionTime":"2015-02-01T20:08:39Z"},