Github user sohami commented on a diff in the pull request:

    https://github.com/apache/drill/pull/809#discussion_r117423249
  
    --- Diff: contrib/native/client/src/clientlib/drillClientImpl.cpp ---
    @@ -234,6 +233,37 @@ void DrillClientImpl::Close() {
     }
     
     /*
    + * Write bytesToWrite length data bytes pointed by dataPtr. It handles 
EINTR error
    + * occurred during write_some sys call and does a retry on that.
    + *
    + * Parameters:
    + *      dataPtr      - in param   - Pointer to data bytes to write on 
socket.
    + *      bytesToWrite - in param   - Length of data bytes to write from 
dataPtr.
    + *      errorCode    -  out param - Error code set by boost.
    + */
    +void DrillClientImpl::doWriteToSocket(const char* dataPtr, size_t 
bytesToWrite,
    +                                        boost::system::error_code& 
errorCode) {
    +    if(0 == bytesToWrite) {
    --- End diff --
    
    Not really. Since write_some will set the proper error code in that case. 
The handing for `bytesToWrite == 0` was done since that's a success case and 
didn't want to call write_some on it.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to