Github user ben-craig commented on a diff in the pull request:
https://github.com/apache/thrift/pull/357#discussion_r23507819
--- Diff: lib/cpp/src/thrift/server/TNonblockingServer.cpp ---
@@ -547,12 +553,18 @@ void TNonblockingServer::TConnection::transition() {
case APP_READ_REQUEST:
// We are done reading the request, package the read buffer into
transport
// and get back some data from the dispatch function
- inputTransport_->resetBuffer(readBuffer_, readBufferPos_);
- outputTransport_->resetBuffer();
- // Prepend four bytes of blank space to the buffer so we can
- // write the frame size there later.
- outputTransport_->getWritePtr(4);
- outputTransport_->wroteBytes(4);
+ if (!server_->getOutputProtocolFactory()) {
--- End diff --
If I understand this correctly, then this is basically asking "are we in
the THeader case". I think that this information should be stored in a well
named member enum, and then we can query that. The current query doesn't
really express intent to me.
Alternatively, comment the reason for the difference.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---