mirror of
https://github.com/status-im/consul.git
synced 2025-01-10 22:06:20 +00:00
vendor: update github.com/hashicorp/memberlist (#3176)
This commit is contained in:
parent
da01cd112e
commit
da97de42be
27
vendor/github.com/hashicorp/memberlist/net.go
generated
vendored
27
vendor/github.com/hashicorp/memberlist/net.go
generated
vendored
@ -55,6 +55,7 @@ const (
|
|||||||
encryptMsg
|
encryptMsg
|
||||||
nackRespMsg
|
nackRespMsg
|
||||||
hasCrcMsg
|
hasCrcMsg
|
||||||
|
errMsg
|
||||||
)
|
)
|
||||||
|
|
||||||
// compressionType is used to specify the compression algorithm
|
// compressionType is used to specify the compression algorithm
|
||||||
@ -105,6 +106,11 @@ type nackResp struct {
|
|||||||
SeqNo uint32
|
SeqNo uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// err response is sent to relay the error from the remote end
|
||||||
|
type errResp struct {
|
||||||
|
Error string
|
||||||
|
}
|
||||||
|
|
||||||
// suspect is broadcast when we suspect a node is dead
|
// suspect is broadcast when we suspect a node is dead
|
||||||
type suspect struct {
|
type suspect struct {
|
||||||
Incarnation uint32
|
Incarnation uint32
|
||||||
@ -209,6 +215,19 @@ func (m *Memberlist) handleConn(conn net.Conn) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
if err != io.EOF {
|
if err != io.EOF {
|
||||||
m.logger.Printf("[ERR] memberlist: failed to receive: %s %s", err, LogConn(conn))
|
m.logger.Printf("[ERR] memberlist: failed to receive: %s %s", err, LogConn(conn))
|
||||||
|
|
||||||
|
resp := errResp{err.Error()}
|
||||||
|
out, err := encode(errMsg, &resp)
|
||||||
|
if err != nil {
|
||||||
|
m.logger.Printf("[ERR] memberlist: Failed to encode error response: %s", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
err = m.rawSendMsgStream(conn, out.Bytes())
|
||||||
|
if err != nil {
|
||||||
|
m.logger.Printf("[ERR] memberlist: Failed to send error: %s %s", err, LogConn(conn))
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -726,6 +745,14 @@ func (m *Memberlist) sendAndReceiveState(addr string, join bool) ([]pushNodeStat
|
|||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if msgType == errMsg {
|
||||||
|
var resp errResp
|
||||||
|
if err := dec.Decode(&resp); err != nil {
|
||||||
|
return nil, nil, err
|
||||||
|
}
|
||||||
|
return nil, nil, fmt.Errorf("remote error: %v", resp.Error)
|
||||||
|
}
|
||||||
|
|
||||||
// Quit if not push/pull
|
// Quit if not push/pull
|
||||||
if msgType != pushPullMsg {
|
if msgType != pushPullMsg {
|
||||||
err := fmt.Errorf("received invalid msgType (%d), expected pushPullMsg (%d) %s", msgType, pushPullMsg, LogConn(conn))
|
err := fmt.Errorf("received invalid msgType (%d), expected pushPullMsg (%d) %s", msgType, pushPullMsg, LogConn(conn))
|
||||||
|
6
vendor/vendor.json
vendored
6
vendor/vendor.json
vendored
@ -403,10 +403,10 @@
|
|||||||
"revisionTime": "2015-06-09T07:04:31Z"
|
"revisionTime": "2015-06-09T07:04:31Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "AoIvQFHycqypYK57ZjiWzlQmdwk=",
|
"checksumSHA1": "uG7wNsy24v7bJxFmWVcL3v5Wvx0=",
|
||||||
"path": "github.com/hashicorp/memberlist",
|
"path": "github.com/hashicorp/memberlist",
|
||||||
"revision": "16fe34d996eba2b68f6f46f26c51c617c6bc1bf0",
|
"revision": "0a136466d82a7e6f1b7866dde3578ac28ed675ad",
|
||||||
"revisionTime": "2017-05-26T19:17:51Z"
|
"revisionTime": "2017-06-22T10:25:31Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "qnlqWJYV81ENr61SZk9c65R1mDo=",
|
"checksumSHA1": "qnlqWJYV81ENr61SZk9c65R1mDo=",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user