Skip to content
This repository was archived by the owner on Jan 23, 2019. It is now read-only.

Commit 51296a9

Browse files
ashiquzzaman33tamalsaha
authored andcommitted
Fix Odd use of time.Duration (#29)
Ref - #28
1 parent d35a038 commit 51296a9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

client/client.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
)
1717

1818
var (
19-
DefaultTimeout time.Duration = 1000
19+
DefaultTimeout time.Duration = time.Second
2020
)
2121

2222
// One client connect to one server.
@@ -31,7 +31,7 @@ type Client struct {
3131
conn net.Conn
3232
rw *bufio.ReadWriter
3333

34-
ResponseTimeout time.Duration // response timeout for do() in ms
34+
ResponseTimeout time.Duration // response timeout for do()
3535

3636
ErrorHandler ErrorHandler
3737
}
@@ -240,7 +240,7 @@ func (client *Client) do(funcname string, data []byte, flag rt.PT) (handle strin
240240
client.innerHandler.remove("c")
241241
return
242242
}
243-
var timer = time.After(client.ResponseTimeout * time.Millisecond)
243+
var timer = time.After(client.ResponseTimeout)
244244
select {
245245
case ret := <-result:
246246
return ret.handle, ret.err

0 commit comments

Comments
 (0)