Code Review
/
common
/
thrift.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
4771458
)
C++/TFramedTransport: Don't write an empty frame on flush.
author
David Reiss
<dreiss@apache.org>
Fri, 9 May 2008 07:14:10 +0000
(07:14 +0000)
committer
David Reiss
<dreiss@apache.org>
Fri, 9 May 2008 07:14:10 +0000
(07:14 +0000)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665681
13f79535
-47bb-0310-9956-
ffa450edef68
lib/cpp/src/transport/TBufferTransports.cpp
patch
|
blob
|
history
diff --git
a/lib/cpp/src/transport/TBufferTransports.cpp
b/lib/cpp/src/transport/TBufferTransports.cpp
index
0deef1b
..
b26fd3d
100644
(file)
--- a/
lib/cpp/src/transport/TBufferTransports.cpp
+++ b/
lib/cpp/src/transport/TBufferTransports.cpp
@@
-230,8
+230,10
@@
void TFramedTransport::flush() {
sz_nbo = (int32_t)htonl((uint32_t)(sz_hbo));
memcpy(wBuf_.get(), (uint8_t*)&sz_nbo, sizeof(sz_nbo));
- // Write size and frame body.
- transport_->write(wBuf_.get(), sizeof(sz_nbo)+sz_hbo);
+ if (sz_hbo > 0) {
+ // Write size and frame body.
+ transport_->write(wBuf_.get(), sizeof(sz_nbo)+sz_hbo);
+ }
// Reset our pointers.
wBase_ = wBuf_.get();