Let's do millisecond granularity in the GetMessage

parent b429a777
......@@ -130,7 +130,7 @@ func (c Client) GetMessage(timeout int64) (Message, error) {
select {
case <-c.recvCh:
return c.getMsg()
case <-time.After(time.Second * time.Duration(timeout)):
case <-time.After(time.Millisecond * time.Duration(timeout)):
return Message{}, TimeoutError{}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment