mirror of
https://github.com/status-im/consul.git
synced 2025-01-22 19:50:36 +00:00
Adds a paranoia set of the nodes slice to nil.
This commit is contained in:
parent
46d5afa574
commit
b8ddb21978
@ -544,6 +544,14 @@ func queryFailover(q queryServer, query *structs.PreparedQuery,
|
||||
// This keeps track of how many iterations we actually run.
|
||||
failovers++
|
||||
|
||||
// Be super paranoid and set the nodes slice to nil since it's
|
||||
// the same slice we used before. We know there's nothing in
|
||||
// there, but the underlying msgpack library has a policy of
|
||||
// updating the slice when it's non-nil, and that feels dirty.
|
||||
// Let's just set it to nil so there's no way to communicate
|
||||
// through this slice across successive RPC calls.
|
||||
reply.Nodes = nil
|
||||
|
||||
// Note that we pass along the limit since it can be applied
|
||||
// remotely to save bandwidth. We also pass along the consistency
|
||||
// mode information we were given, so that applies to the remote
|
||||
|
Loading…
x
Reference in New Issue
Block a user