Do not ignore write errors
This commit is contained in:
parent
ccb6f4a24f
commit
7bcc4de76f
@ -194,7 +194,11 @@ func (client *Client) do(funcname string, data []byte,
|
|||||||
id := IdGen.Id()
|
id := IdGen.Id()
|
||||||
req := getJob(id, []byte(funcname), data)
|
req := getJob(id, []byte(funcname), data)
|
||||||
req.DataType = flag
|
req.DataType = flag
|
||||||
client.write(req)
|
if err = client.write(req); err != nil {
|
||||||
|
delete(client.innerHandler, "c")
|
||||||
|
client.lastcall = ""
|
||||||
|
return
|
||||||
|
}
|
||||||
mutex.Lock()
|
mutex.Lock()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user