Skip to content

Commit

Permalink
Fixed type check in if constexpr
Browse files Browse the repository at this point in the history
  • Loading branch information
loonycyborg committed Feb 9, 2021
1 parent d18c4ea commit 5cccb26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/common/server_base.cpp
Expand Up @@ -192,7 +192,7 @@ void server_base::serve(boost::asio::yield_context yield, boost::asio::ip::tcp::
async_send_error(socket, "Too many connections from your IP.");
return;
} else {
if constexpr (std::is_same_v<decltype(socket), tls_socket_ptr>) {
if constexpr (std::is_same_v<std::remove_reference_t<decltype(socket)>, tls_socket_ptr>) {
DBG_SERVER << ip << "\tnew encrypted connection fully accepted\n";
} else {
DBG_SERVER << ip << "\tnew connection fully accepted\n";
Expand Down

0 comments on commit 5cccb26

Please sign in to comment.