X-Git-Url: https://git.giacomolli.uk/onehouse/blobdiff_plain/db3091ee257788c92421a5b8b1af49d429ce8f8e..b9a4f3bdd2609a8b178dd42f313c383ccb59049b:/driver/alamo/http_client.go?ds=sidebyside diff --git a/driver/alamo/http_client.go b/driver/alamo/http_client.go index ac00dfc..7179124 100644 --- a/driver/alamo/http_client.go +++ b/driver/alamo/http_client.go @@ -14,8 +14,8 @@ import ( ) const ( - gatewayRequestTimeout = 5 * time.Second - gatewayResponseLimit = 64 * 1024 + httpRequestTimeout = 5 * time.Second + gatewayResponseLimit = 64 * 1024 ) // HTTPClient exchanges bounded GET requests with one HTTP gateway origin. Each @@ -96,7 +96,7 @@ func (c *HTTPClient) Action(ctx context.Context, mac string, action Action) (Sta } func (c *HTTPClient) exchange(ctx context.Context, path string, query url.Values) (states []State, err error) { - ctx, cancel := context.WithTimeout(ctx, gatewayRequestTimeout) + ctx, cancel := context.WithTimeout(ctx, httpRequestTimeout) defer cancel() address := c.origin + path