[ 
https://issues.apache.org/jira/browse/MESOS-6789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15822560#comment-15822560
 ] 

Joseph Wu commented on MESOS-6789:
----------------------------------

{code}
commit c600d12a01865daad8ba7607b53eff35686f0f35
Author: Greg Mann <[email protected]>
Date:   Fri Jan 13 15:56:34 2017 -0800

    Fixed SSL socket 'shutdown()'.
    
    Recently, a change was made to the signature of
    `Socket::shutdown`, but the corresponding override in
    `LibeventSSLSocketImpl` was not updated, so that the
    implementation-specific method is no longer being
    executed. Further, the SSL socket's `shutdown` code
    did not actually shutdown the socket; rather, the
    shutdown was performed in the destructor.
    
    This patch updates the function's signature to match
    that of the base class's method, adds the `override`
    specifier to the implemention's method declaration,
    and updates the function to properly shutdown the
    SSL socket.
    
    Review: https://reviews.apache.org/r/55343/
{code}

> SSL socket's 'shutdown()' method is broken
> ------------------------------------------
>
>                 Key: MESOS-6789
>                 URL: https://issues.apache.org/jira/browse/MESOS-6789
>             Project: Mesos
>          Issue Type: Bug
>          Components: libprocess
>            Reporter: Greg Mann
>            Assignee: Greg Mann
>              Labels: encryption, libprocess, ssl
>             Fix For: 1.2.0
>
>
> We recently uncovered two issues with the {{LibeventSSLSocketImpl::shutdown}} 
> method:
> * The introduction of a shutdown method parameter with [this 
> commit|https://reviews.apache.org/r/54113/] means that the implementation's 
> method is no longer overriding the default implementation. In addition to 
> fixing the implementation method's signature, we should add the {{override}} 
> specifier to all of our socket implementations' methods to ensure that this 
> doesn't happen in the future.
> * The {{LibeventSSLSocketImpl::shutdown}} function does not actually shutdown 
> the SSL socket. The proper function to shutdown an SSL socket is 
> {{SSL_shutdown}}, which is called in the implementation's destructor. We 
> should move this into {{shutdown()}} so that by the time that method returns, 
> the socket has actually been shutdown.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to