Github user laurentgo commented on a diff in the pull request:
https://github.com/apache/drill/pull/950#discussion_r142736318
--- Diff: contrib/native/client/src/clientlib/drillClientImpl.cpp ---
@@ -250,7 +205,15 @@ void DrillClientImpl::doWriteToSocket(const char*
dataPtr, size_t bytesToWrite,
// Write all the bytes to socket. In case of error when all bytes are
not successfully written
// proper errorCode will be set.
while(1) {
- size_t bytesWritten =
m_socket.write_some(boost::asio::buffer(dataPtr, bytesToWrite), errorCode);
+ size_t bytesWritten;
+ {
+ boost::lock_guard<boost::mutex> lock(m_channelMutex);
--- End diff --
it seems weird that a mutex is now required. Before, the socket was
existing, why it would not be the case for the channel?
---