fix SSL test

This commit is contained in:
arvidn 2019-10-14 12:35:17 +02:00 committed by Arvid Norberg
parent 9115c8c28d
commit c8f3063f25
1 changed files with 12 additions and 2 deletions

View File

@ -101,7 +101,12 @@ bool on_alert(alert const* a)
if (peer_disconnected_alert const* e = alert_cast<peer_disconnected_alert>(a))
{
++peer_disconnects;
if (strcmp(e->error.category().name(), boost::asio::error::get_ssl_category().name()) == 0)
string_view const cat = e->error.category().name();
if (cat == boost::asio::error::get_ssl_category().name()
#if BOOST_VERSION >= 106400
|| cat == boost::asio::ssl::error::get_stream_category().name()
#endif
)
++ssl_peer_disconnects;
std::printf("--- peer_errors: %d ssl_disconnects: %d\n"
@ -113,7 +118,12 @@ bool on_alert(alert const* a)
++peer_disconnects;
++peer_errors;
if (strcmp(e->error.category().name(), boost::asio::error::get_ssl_category().name()) == 0)
string_view const cat = e->error.category().name();
if (cat == boost::asio::error::get_ssl_category().name()
#if BOOST_VERSION >= 106400
|| cat == boost::asio::ssl::error::get_stream_category().name()
#endif
)
++ssl_peer_disconnects;
std::printf("--- peer_errors: %d ssl_disconnects: %d\n"