From a505cbbd2563ad93d14ea27e5a8db26f9538bf5d Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Mon, 20 Jul 2020 09:09:18 +0200 Subject: [PATCH] change ReadTimeout default value --- conn-client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conn-client.go b/conn-client.go index 79143b2c..564783a9 100644 --- a/conn-client.go +++ b/conn-client.go @@ -42,7 +42,7 @@ type ConnClientConf struct { Host string // (optional) timeout for read requests. - // It defaults to 5 seconds + // It defaults to 10 seconds ReadTimeout time.Duration // (optional) timeout for write requests. @@ -71,7 +71,7 @@ type ConnClient struct { // NewConnClient allocates a ConnClient. See ConnClientConf for the options. func NewConnClient(conf ConnClientConf) (*ConnClient, error) { if conf.ReadTimeout == time.Duration(0) { - conf.ReadTimeout = 5 * time.Second + conf.ReadTimeout = 10 * time.Second } if conf.WriteTimeout == time.Duration(0) { conf.WriteTimeout = 5 * time.Second