From 51296a94493ee030fce4ef67e7badbd9f03e540a Mon Sep 17 00:00:00 2001 From: "Md. Ashiquzzaman" Date: Tue, 6 Jun 2017 15:58:19 +0600 Subject: [PATCH] Fix Odd use of time.Duration (#29) Ref - https://github.com/appscode/g2/issues/28 --- client/client.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/client.go b/client/client.go index a92d0a6..08b1c2a 100644 --- a/client/client.go +++ b/client/client.go @@ -16,7 +16,7 @@ import ( ) var ( - DefaultTimeout time.Duration = 1000 + DefaultTimeout time.Duration = time.Second ) // One client connect to one server. @@ -31,7 +31,7 @@ type Client struct { conn net.Conn rw *bufio.ReadWriter - ResponseTimeout time.Duration // response timeout for do() in ms + ResponseTimeout time.Duration // response timeout for do() ErrorHandler ErrorHandler } @@ -240,7 +240,7 @@ func (client *Client) do(funcname string, data []byte, flag rt.PT) (handle strin client.innerHandler.remove("c") return } - var timer = time.After(client.ResponseTimeout * time.Millisecond) + var timer = time.After(client.ResponseTimeout) select { case ret := <-result: return ret.handle, ret.err