diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2018-01-16 12:03:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-16 12:03:31 -0500 |
commit | 2fa7c464f019f67c5c0494aaf5ac0f5ecc1ee7a7 (patch) | |
tree | e08ff912e1924c06939f314168c3362d6f1ec0de /vendor/github.com/hashicorp | |
parent | f5c8a71698d0a7a16c68be220e49fe64bfee7f5c (diff) | |
download | chat-2fa7c464f019f67c5c0494aaf5ac0f5ecc1ee7a7.tar.gz chat-2fa7c464f019f67c5c0494aaf5ac0f5ecc1ee7a7.tar.bz2 chat-2fa7c464f019f67c5c0494aaf5ac0f5ecc1ee7a7.zip |
Updated dependencies and added avct/uasurfer (#8089)
* Updated dependencies and added avct/uasurfer
* Added uasurfer to NOTICE.txt
Diffstat (limited to 'vendor/github.com/hashicorp')
5 files changed, 14 insertions, 10 deletions
diff --git a/vendor/github.com/hashicorp/go-multierror/.travis.yml b/vendor/github.com/hashicorp/go-multierror/.travis.yml index 4b865d194..304a83595 100644 --- a/vendor/github.com/hashicorp/go-multierror/.travis.yml +++ b/vendor/github.com/hashicorp/go-multierror/.travis.yml @@ -3,7 +3,7 @@ sudo: false language: go go: - - 1.6 + - 1.x branches: only: diff --git a/vendor/github.com/hashicorp/memberlist/memberlist.go b/vendor/github.com/hashicorp/memberlist/memberlist.go index bdf333b43..e9084f9fd 100644 --- a/vendor/github.com/hashicorp/memberlist/memberlist.go +++ b/vendor/github.com/hashicorp/memberlist/memberlist.go @@ -639,7 +639,9 @@ func (m *Memberlist) Shutdown() error { // Shut down the transport first, which should block until it's // completely torn down. If we kill the memberlist-side handlers // those I/O handlers might get stuck. - m.transport.Shutdown() + if err := m.transport.Shutdown(); err != nil { + m.logger.Printf("[ERR] Failed to shutdown transport: %v", err) + } // Now tear down everything else. atomic.StoreInt32(&m.shutdown, 1) diff --git a/vendor/github.com/hashicorp/memberlist/net.go b/vendor/github.com/hashicorp/memberlist/net.go index 58e1fce20..a4330c4d2 100644 --- a/vendor/github.com/hashicorp/memberlist/net.go +++ b/vendor/github.com/hashicorp/memberlist/net.go @@ -1059,7 +1059,7 @@ func (m *Memberlist) readUserMsg(bufConn io.Reader, dec *codec.Decoder) error { // operations, given the deadline. The bool return parameter is true if we // we able to round trip a ping to the other node. func (m *Memberlist) sendPingAndWaitForAck(addr string, ping ping, deadline time.Time) (bool, error) { - conn, err := m.transport.DialTimeout(addr, m.config.TCPTimeout) + conn, err := m.transport.DialTimeout(addr, deadline.Sub(time.Now())) if err != nil { // If the node is actually dead we expect this to fail, so we // shouldn't spam the logs with it. After this point, errors diff --git a/vendor/github.com/hashicorp/memberlist/state.go b/vendor/github.com/hashicorp/memberlist/state.go index 29fe5f1cf..f51692de0 100644 --- a/vendor/github.com/hashicorp/memberlist/state.go +++ b/vendor/github.com/hashicorp/memberlist/state.go @@ -251,10 +251,17 @@ func (m *Memberlist) probeNode(node *nodeState) { nackCh := make(chan struct{}, m.config.IndirectChecks+1) m.setProbeChannels(ping.SeqNo, ackCh, nackCh, probeInterval) + // Mark the sent time here, which should be after any pre-processing but + // before system calls to do the actual send. This probably over-reports + // a bit, but it's the best we can do. We had originally put this right + // after the I/O, but that would sometimes give negative RTT measurements + // which was not desirable. + sent := time.Now() + // Send a ping to the node. If this node looks like it's suspect or dead, // also tack on a suspect message so that it has a chance to refute as // soon as possible. - deadline := time.Now().Add(probeInterval) + deadline := sent.Add(probeInterval) addr := node.Address() if node.State == stateAlive { if err := m.encodeAndSendMsg(addr, pingMsg, &ping); err != nil { @@ -284,11 +291,6 @@ func (m *Memberlist) probeNode(node *nodeState) { } } - // Mark the sent time here, which should be after any pre-processing and - // system calls to do the actual send. This probably under-reports a bit, - // but it's the best we can do. - sent := time.Now() - // Arrange for our self-awareness to get updated. At this point we've // sent the ping, so any return statement means the probe succeeded // which will improve our health until we get to the failure scenarios diff --git a/vendor/github.com/hashicorp/memberlist/transport.go b/vendor/github.com/hashicorp/memberlist/transport.go index ca0a66083..6ce55ea47 100644 --- a/vendor/github.com/hashicorp/memberlist/transport.go +++ b/vendor/github.com/hashicorp/memberlist/transport.go @@ -17,7 +17,7 @@ type Packet struct { // Timestamp is the time when the packet was received. This should be // taken as close as possible to the actual receipt time to help make an - // accurate RTT measurements during probes. + // accurate RTT measurement during probes. Timestamp time.Time } |