diff --git a/client/client.go b/client/client.go index 368363c..222cdc6 100644 --- a/client/client.go +++ b/client/client.go @@ -221,6 +221,8 @@ func (client *Client) do(funcname string, data []byte, return "", ErrLostConn } var result = make(chan handleOrError, 1) + client.Lock() + defer client.Unlock() client.lastcall = "c" client.innerHandler.put("c", func(resp *Response) { if resp.DataType == dtError {