Skip to content

Commit

Permalink
Treat SSL_ERROR_ZERO_RETURN as EOF
Browse files Browse the repository at this point in the history
  • Loading branch information
vinniefalco committed Dec 18, 2018
1 parent a6008b6 commit 89feb2a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/boost/asio/ssl/detail/impl/engine.ipp
Expand Up @@ -17,6 +17,7 @@

#include <boost/asio/detail/config.hpp>

#include <boost/asio/detail/assert.hpp>
#include <boost/asio/detail/throw_error.hpp>
#include <boost/asio/error.hpp>
#include <boost/asio/ssl/detail/engine.hpp>
Expand Down Expand Up @@ -274,8 +275,15 @@ engine::want engine::perform(int (engine::* op)(void*, std::size_t),
ec = boost::asio::error::eof;
return want_nothing;
}
else if (ssl_error == SSL_ERROR_ZERO_RETURN)
{
ec = boost::asio::error::eof;
return want_nothing;
}
else
{
BOOST_ASIO_ASSERT(result > 0);
//if(result <= 0) std::cerr << "result <= 0, ssl_error = " << ssl_error << std::endl;
ec = boost::system::error_code();
return want_nothing;
}
Expand Down

0 comments on commit 89feb2a

Please sign in to comment.