From 2ec5d7de76d551c4d9968ff9382f1174b9af5196 Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Fri, 19 Feb 2016 22:34:52 -0800 Subject: [PATCH] undo async update --- client/client.go | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/client/client.go b/client/client.go index 691d66b95..8fb1cf0d8 100644 --- a/client/client.go +++ b/client/client.go @@ -817,19 +817,16 @@ func (c *Client) updateNodeStatus() error { // updateAllocStatus is used to update the status of an allocation func (c *Client) updateAllocStatus(alloc *structs.Allocation) error { - // XXX: For testing ONLY. Do not use this commit!!! - go func() { - args := structs.AllocUpdateRequest{ - Alloc: []*structs.Allocation{alloc}, - WriteRequest: structs.WriteRequest{Region: c.config.Region}, - } - var resp structs.GenericResponse - err := c.RPC("Node.UpdateAlloc", &args, &resp) - if err != nil { - c.logger.Printf("[ERR] client: failed to update allocation: %v", err) - //return err - } - }() + args := structs.AllocUpdateRequest{ + Alloc: []*structs.Allocation{alloc}, + WriteRequest: structs.WriteRequest{Region: c.config.Region}, + } + var resp structs.GenericResponse + err := c.RPC("Node.UpdateAlloc", &args, &resp) + if err != nil { + c.logger.Printf("[ERR] client: failed to update allocation: %v", err) + return err + } return nil }