Merge pull request #49 from gbarr/write-errors

Do not ignore write errors
This commit is contained in:
Xing 2014-08-21 09:24:18 +08:00
commit 9387a36a0b

View File

@ -194,7 +194,11 @@ func (client *Client) do(funcname string, data []byte,
id := IdGen.Id()
req := getJob(id, []byte(funcname), data)
req.DataType = flag
client.write(req)
if err = client.write(req); err != nil {
delete(client.innerHandler, "c")
client.lastcall = ""
return
}
mutex.Lock()
return
}