diff --git a/include/libtorrent/ssl_stream.hpp b/include/libtorrent/ssl_stream.hpp index 2582f724a..c2f9ec3d9 100644 --- a/include/libtorrent/ssl_stream.hpp +++ b/include/libtorrent/ssl_stream.hpp @@ -150,14 +150,14 @@ public: template void get_option(GettableSocketOption& opt) { - m_sock.get_option(opt); + m_sock.next_layer().get_option(opt); } #endif template error_code get_option(GettableSocketOption& opt, error_code& ec) { - return m_sock.get_option(opt, ec); + return m_sock.next_layer().get_option(opt, ec); } #ifndef BOOST_NO_EXCEPTIONS