IsDisconnected not working on real server disconnect
jwang-r7 opened this issue · comments
IsDisconnected
works when calling conn.Close()
. However, when killing the server it's connected to in a real scenario doesn't seem to return the same.
I have seen it return:
ErrConnClosed
- Named pipe file closed from the library that I'm using
Not sure if it will return ExcClosed
at any point.
f, release = myclient.MyMethod(ctx, func(ps rpc_api.Params) error {
// Some CB
return nil
})
val, err := f.Struct() // catching connection err
I will hazard a guess that we have code that is handling message send failures by just propagating the error returned by the transport; probably to fix this we need to update those call sites to wrap the error.