(err error)
| 538 | } |
| 539 | |
| 540 | func (w *messageWriter) endMessage(err error) error { |
| 541 | if w.err != nil { |
| 542 | return err |
| 543 | } |
| 544 | c := w.c |
| 545 | w.err = err |
| 546 | c.writer = nil |
| 547 | if c.writePool != nil { |
| 548 | c.writePool.Put(writePoolData{buf: c.writeBuf}) |
| 549 | c.writeBuf = nil |
| 550 | } |
| 551 | return err |
| 552 | } |
| 553 | |
| 554 | // flushFrame writes buffered data and extra as a frame to the network. The |
| 555 | // final argument indicates that this is the last frame in the message. |