Do not ignore write errors

This commit is contained in:
Graham Barr 2014-08-20 11:27:32 -05:00
parent ccb6f4a24f
commit 7bcc4de76f

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
}