Connection.Reply
parent
0becfa3df2
commit
5238806cff
|
@ -449,17 +449,15 @@ func (c *Connection) Reply(ctx context.Context, opErr error) {
|
||||||
c.errorLogger.Printf("%T error: %v", op, opErr)
|
c.errorLogger.Printf("%T error: %v", op, opErr)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send the reply to the kernel.
|
// Send the reply to the kernel, if one is required.
|
||||||
replyMsg := kernelResponse(m.Header().Unique, op, opErr, c.protocol)
|
outMsg := c.kernelResponse(m.Header().Unique, op, opErr)
|
||||||
if replyMsg != nil {
|
if outMsg != nil {
|
||||||
if err := c.writeMessage(replyMsg); err != nil {
|
err := c.writeMessage(outMsg.Bytes())
|
||||||
if c.errorLogger != nil {
|
c.putOutMessage(outMsg)
|
||||||
|
|
||||||
|
if err != nil && c.errorLogger != nil {
|
||||||
c.errorLogger.Printf("writeMessage: %v", err)
|
c.errorLogger.Printf("writeMessage: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue