From 0eb7032735ca07f4c5366758ed79264b560255bb Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Mon, 17 Feb 2020 22:35:21 +0100 Subject: [PATCH] daemon/control: envconst timeout for control socket server-side timeouts refs #262 --- daemon/control.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/control.go b/daemon/control.go index 5cb498d..2170070 100644 --- a/daemon/control.go +++ b/daemon/control.go @@ -147,8 +147,8 @@ func (j *controlJob) Run(ctx context.Context) { server := http.Server{ Handler: mux, // control socket is local, 1s timeout should be more than sufficient, even on a loaded system - WriteTimeout: 1 * time.Second, - ReadTimeout: 1 * time.Second, + WriteTimeout: envconst.Duration("ZREPL_DAEMON_CONTROL_WRITE_TIMEOUT", 1*time.Second), + ReadTimeout: envconst.Duration("ZREPL_DAEMON_CONTROL_READ_TIMEOUT", 1*time.Second), } outer: