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

Commit

Permalink
Fix Odd use of time.Duration (#29)
Browse files Browse the repository at this point in the history
Ref - #28
  • Loading branch information
ashiquzzaman33 authored and tamalsaha committed Jun 6, 2017
1 parent d35a038 commit 51296a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
)

var (
DefaultTimeout time.Duration = 1000
DefaultTimeout time.Duration = time.Second
)

// One client connect to one server.
Expand All @@ -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
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 51296a9

Please sign in to comment.