diff --git a/include/boost/mysql/detail/network_algorithms/impl/close_connection.hpp b/include/boost/mysql/detail/network_algorithms/impl/close_connection.hpp index d2b0098e..c4fb8710 100644 --- a/include/boost/mysql/detail/network_algorithms/impl/close_connection.hpp +++ b/include/boost/mysql/detail/network_algorithms/impl/close_connection.hpp @@ -20,16 +20,18 @@ error_code close_channel( channel& chan ) { - error_code err0, err1; - chan.next_layer().shutdown(Stream::shutdown_both, err0); - chan.next_layer().close(err1); - return err0 ? err0 : err1; + error_code err; + chan.next_layer().shutdown(Stream::shutdown_both, err); + chan.next_layer().close(err); + return err; } } // detail } // mysql } // boost + + template void boost::mysql::detail::close_connection( channel& chan,