-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41253/#review111279
-----------------------------------------------------------

Ship it!



3rdparty/libprocess/src/libevent_ssl_socket.cpp (line 431)
<https://reviews.apache.org/r/41253/#comment171371>

    Why are we using `0` instead of `-1` as the null value? Same above.
    Check out the socket.hpp code.



3rdparty/libprocess/src/libevent_ssl_socket.cpp (line 466)
<https://reviews.apache.org/r/41253/#comment171372>

    Why `<= 0` vs `< 0`?
    http://linux.die.net/man/2/dup


- Joris Van Remoortere


On Dec. 18, 2015, 5:52 p.m., Jojy Varghese wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41253/
> -----------------------------------------------------------
> 
> (Updated Dec. 18, 2015, 5:52 p.m.)
> 
> 
> Review request for mesos, Joris Van Remoortere and Joseph Wu.
> 
> 
> Bugs: MESOS-3773
>     https://issues.apache.org/jira/browse/MESOS-3773
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> libprocess Socket shares the ownership of the file descriptor with libevent. 
> In
> the destructor of the libprocess libevent_ssl socket, we call ssl shutdown 
> which
> is executed asynchronously. This causes the libprocess socket file descriptor 
> to
> be closed (and possibly reused) when the same file descriptor could be used by
> libevent/ssl. Since we set the shutdown options as SSL_RECEIVED_SHUTDOWN, we
> leave the any write operations to continue with possibly closed file 
> descriptor.
>     
> This change solves the above issue by copying(dup) the original file 
> descriptor
> and hands over the copy to libevent ssl. The copied descriptor is then managed
> by libprocess Socket.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/libevent_ssl_socket.hpp 
> 2669b1a1d8f275b89c75d5f12fc696be2b277220 
>   3rdparty/libprocess/src/libevent_ssl_socket.cpp 
> 55b91dd47bb5bd5e97147d0af91c7899fd42702c 
> 
> Diff: https://reviews.apache.org/r/41253/diff/
> 
> 
> Testing
> -------
> 
> make check.
> 
> 
> Thanks,
> 
> Jojy Varghese
> 
>

Reply via email to