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 23, 2021
1 parent 32a94f4 commit da6ac1e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/server/common/server_base.cpp
Expand Up @@ -17,6 +17,7 @@
#include "log.hpp"
#include "serialization/parser.hpp"
#include "filesystem.hpp"
#include "utils/general.hpp"

#ifdef HAVE_CONFIG_H
#include "config.h"
Expand Down Expand Up @@ -192,7 +193,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 (utils::decayed_is_same<tls_socket_ptr, decltype(socket)>) {
DBG_SERVER << ip << "\tnew encrypted connection fully accepted\n";
} else {
DBG_SERVER << ip << "\tnew connection fully accepted\n";
Expand Down

0 comments on commit da6ac1e

Please sign in to comment.