Skip to content

Commit 0a7ab0e

Browse files
authored
Merge pull request #29 from k1LoW/server-timeout
Remove timeout for http server.
2 parents ced80f7 + ee63d69 commit 0a7ab0e

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

cmd/root.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import (
2727
"net/http"
2828
"net/url"
2929
"os"
30-
"time"
3130

3231
"github.com/k1LoW/grouped_process_exporter/collector"
3332
"github.com/k1LoW/grouped_process_exporter/grouper"
@@ -43,11 +42,6 @@ import (
4342
"github.com/spf13/cobra"
4443
)
4544

46-
const (
47-
srvReadTimeout = 10 * time.Second
48-
srvWriteTimeout = 5 * time.Second
49-
)
50-
5145
var (
5246
address string
5347
endpoint string
@@ -150,9 +144,7 @@ func runRoot(args []string, address, endpoint, groupType, nReStr, eReStr string,
150144
}
151145

152146
srv := &http.Server{
153-
Addr: address,
154-
ReadTimeout: srvReadTimeout,
155-
WriteTimeout: srvWriteTimeout,
147+
Addr: address,
156148
}
157149

158150
handler := promhttp.HandlerFor(

0 commit comments

Comments
 (0)