Commit e5c56348 authored by Dan Melnic's avatar Dan Melnic Committed by Facebook GitHub Bot

Use zerocopy only if all the IOBufs in the chain have a SharedInfo

Summary: Use zerocopy only if all the IOBufs in the chain have a SharedInfo

Reviewed By: knekritz

Differential Revision: D21342852

fbshipit-source-id: 458c32ef336b76ed0dc226ea670b7c04c1427bee
parent 3bd6e353
...@@ -1044,7 +1044,7 @@ void AsyncSocket::writeChain( ...@@ -1044,7 +1044,7 @@ void AsyncSocket::writeChain(
// adjustZeroCopyFlags can set zeroCopyEnabled_ to true // adjustZeroCopyFlags can set zeroCopyEnabled_ to true
if (zeroCopyEnabled_ && !isSet(flags, WriteFlags::WRITE_MSG_ZEROCOPY) && if (zeroCopyEnabled_ && !isSet(flags, WriteFlags::WRITE_MSG_ZEROCOPY) &&
zeroCopyEnableFunc_ && zeroCopyEnableFunc_(buf)) { zeroCopyEnableFunc_ && zeroCopyEnableFunc_(buf) && buf->isManaged()) {
flags |= WriteFlags::WRITE_MSG_ZEROCOPY; flags |= WriteFlags::WRITE_MSG_ZEROCOPY;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment