From dea8ba89e0acba03dd06689c4fbcf76187124257 Mon Sep 17 00:00:00 2001 From: Keval Shah Date: Thu, 10 Mar 2022 13:30:04 -0800 Subject: [PATCH] Update victorops.go timeout fix --- victorops/victorops.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/victorops/victorops.go b/victorops/victorops.go index a02048c..97b9f42 100644 --- a/victorops/victorops.go +++ b/victorops/victorops.go @@ -6,6 +6,7 @@ import ( "io/ioutil" "net/http" "net/http/httputil" + "time" ) // Client is the main client for interacting with victorops @@ -84,7 +85,7 @@ func (c Client) makePublicAPICall(method string, endpoint string, requestBody io // NewClient creates a new VictorOps client func NewClient(apiID string, apiKey string, publicBaseURL string) *Client { - return NewConfigurableClient(apiID, apiKey, publicBaseURL, http.Client{Timeout: 30}) + return NewConfigurableClient(apiID, apiKey, publicBaseURL, http.Client{Timeout: time.Second * 30}) } // NewConfigurableClient creates a new VictorOps client with ClientArgs struct