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)
|
||||
}
|
||||
|
||||
// Send the reply to the kernel.
|
||||
replyMsg := kernelResponse(m.Header().Unique, op, opErr, c.protocol)
|
||||
if replyMsg != nil {
|
||||
if err := c.writeMessage(replyMsg); err != nil {
|
||||
if c.errorLogger != nil {
|
||||
c.errorLogger.Printf("writeMessage: %v", err)
|
||||
}
|
||||
// Send the reply to the kernel, if one is required.
|
||||
outMsg := c.kernelResponse(m.Header().Unique, op, opErr)
|
||||
if outMsg != nil {
|
||||
err := c.writeMessage(outMsg.Bytes())
|
||||
c.putOutMessage(outMsg)
|
||||
|
||||
return
|
||||
if err != nil && c.errorLogger != nil {
|
||||
c.errorLogger.Printf("writeMessage: %v", err)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue