forked from premiere/premiere-libtorrent
add asio debugging to the async shutdown of ssl sockets
This commit is contained in:
parent
39aa23b7b6
commit
88c5b35826
|
@ -3441,8 +3441,11 @@ namespace libtorrent
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void close_socket(boost::shared_ptr<socket_type> const& s)
|
void on_close_socket(boost::shared_ptr<socket_type> const& s)
|
||||||
{
|
{
|
||||||
|
#if defined TORRENT_ASIO_DEBUGGING
|
||||||
|
complete_async("on_close_socket");
|
||||||
|
#endif
|
||||||
error_code ec;
|
error_code ec;
|
||||||
s->close(ec);
|
s->close(ec);
|
||||||
}
|
}
|
||||||
|
@ -3614,8 +3617,14 @@ namespace libtorrent
|
||||||
|
|
||||||
#ifdef TORRENT_USE_OPENSSL
|
#ifdef TORRENT_USE_OPENSSL
|
||||||
// for SSL connections, first do an async_shutdown, before closing the socket
|
// for SSL connections, first do an async_shutdown, before closing the socket
|
||||||
|
#if defined TORRENT_ASIO_DEBUGGING
|
||||||
|
#define MAYBE_ASIO_DEBUGGING add_outstanding_async("on_close_socket");
|
||||||
|
#else
|
||||||
|
#define MAYBE_ASIO_DEBUGGING
|
||||||
|
#endif
|
||||||
#define CASE(t) case socket_type_int_impl<ssl_stream<t> >::value: \
|
#define CASE(t) case socket_type_int_impl<ssl_stream<t> >::value: \
|
||||||
m_socket->get<ssl_stream<t> >()->async_shutdown(boost::bind(&close_socket, m_socket)); \
|
MAYBE_ASIO_DEBUGGING \
|
||||||
|
m_socket->get<ssl_stream<t> >()->async_shutdown(boost::bind(&on_close_socket, m_socket)); \
|
||||||
break;
|
break;
|
||||||
switch(m_socket->type())
|
switch(m_socket->type())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue