diff --git a/client/client.go b/client/client.go index c0562b2..83bda92 100644 --- a/client/client.go +++ b/client/client.go @@ -255,11 +255,11 @@ func (c *client) rpcWriter(stopChan <-chan struct{}, writerDone chan<- error) { } } + err = c.ch.GetCodec().Write(c.conn, cs.Method, cs.Args, cs.ID) if nil == cs.DoneChan { releaseCallState(cs) } - - if err = c.ch.GetCodec().Write(c.conn, cs.Method, cs.Args, cs.ID); nil != err { + if nil != err { err = fmt.Errorf("Client: Cannot send request to wire: [%s]", err) return }