client: reset response struct to avoid decode errors

This commit is contained in:
Armon Dadgar
2015-09-22 22:10:28 -07:00
parent f94c007348
commit 7c4e647cbb

View File

@@ -565,6 +565,7 @@ func (c *Client) watchAllocations(allocUpdates chan []*structs.Allocation) {
for {
// Get the allocations, blocking for updates
resp = structs.NodeAllocsResponse{}
err := c.RPC("Node.GetAllocs", &req, &resp)
if err != nil {
c.logger.Printf("[ERR] client: failed to query for node allocations: %v", err)