summaryrefslogtreecommitdiffstats
path: root/services/webhook/deliver.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/webhook/deliver.go')
-rw-r--r--services/webhook/deliver.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/services/webhook/deliver.go b/services/webhook/deliver.go
index 8ac7d8c192..a417a9e846 100644
--- a/services/webhook/deliver.go
+++ b/services/webhook/deliver.go
@@ -271,14 +271,10 @@ func InitDeliverHooks() {
TLSClientConfig: &tls.Config{InsecureSkipVerify: setting.Webhook.SkipTLSVerify},
Proxy: webhookProxy(),
Dial: func(netw, addr string) (net.Conn, error) {
- conn, err := net.DialTimeout(netw, addr, timeout)
- if err != nil {
- return nil, err
- }
-
- return conn, conn.SetDeadline(time.Now().Add(timeout))
+ return net.DialTimeout(netw, addr, timeout) // dial timeout
},
},
+ Timeout: timeout, // request timeout
}
go graceful.GetManager().RunWithShutdownContext(DeliverHooks)