Changeset 44668


Ignore:
Timestamp:
Apr 21, 2008, 1:42:10 AM (10 years ago)
Author:
chris_kohlhoff
Message:

Fix infinite recursion in the ssl::stream's shutdown() implementation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/boost/asio/ssl/detail/openssl_operation.hpp

    r42759 r44668  
    170170            SSL_SENT_SHUTDOWN);
    171171
    172     if (is_shut_down_sent && is_shut_down_received && is_operation_done)
     172    if (is_shut_down_sent && is_shut_down_received && is_operation_done && !is_write_needed)
    173173      // SSL connection is shut down cleanly
    174174      return handler_(boost::system::error_code(), 1);
    175175
    176     if (is_shut_down_received && !is_write_needed)
    177       return handler_(boost::asio::error::eof, 0);
    178 
    179     if (is_shut_down_received)
     176    if (is_shut_down_received && !is_operation_done)
    180177      // Shutdown has been requested, while we were reading or writing...
    181178      // abort our action...
     
    227224        return start();
    228225      }
    229       else if (is_read_needed)
     226      else if (is_read_needed || (is_shut_down_sent && !is_shut_down_received))
    230227      {
    231228        return read_();
Note: See TracChangeset for help on using the changeset viewer.