• Neel Goyal's avatar
    Return 0 length iobuf if wrapping empty iovecs · 72e396ca
    Neel Goyal authored
    Summary: Introduction of `folly::IOBuf::wrapIov` and the subsequent change to `WriteChainAsyncTransportWrapper` introduced a subtle change where someone sending a number of 0 length iovs would still get their WriteCallback invoked.   This fixes that case and also invokes WriteCallback if no iovs are to be wrapped.  Arguably, both of these are invalid uses of the API, but this at least fixes the subtleties.
    
    Reviewed By: knekritz
    
    Differential Revision: D9379661
    
    fbshipit-source-id: 73d2f7cd1494be4ccccaa9c1fd834ae5410d6421
    72e396ca
WriteChainAsyncTransportWrapper.h 1.94 KB