TCPServer: disabled debug check in release builds

This commit is contained in:
SChernykh 2023-02-27 19:14:03 +01:00
parent 03a3423da0
commit 2807f9a51c
2 changed files with 6 additions and 0 deletions

View file

@ -170,7 +170,11 @@ protected:
uv_loop_t m_loop; uv_loop_t m_loop;
#ifdef P2POOL_DEBUGGING
static void check_event_loop_thread(const char *func); static void check_event_loop_thread(const char *func);
#else
static FORCEINLINE void check_event_loop_thread(const char*) {}
#endif
std::vector<Client*> m_preallocatedClients; std::vector<Client*> m_preallocatedClients;

View file

@ -367,6 +367,7 @@ bool TCPServer<READ_BUF_SIZE, WRITE_BUF_SIZE>::connect_to_peer(Client* client)
return true; return true;
} }
#ifdef P2POOL_DEBUGGING
template<size_t READ_BUF_SIZE, size_t WRITE_BUF_SIZE> template<size_t READ_BUF_SIZE, size_t WRITE_BUF_SIZE>
void TCPServer<READ_BUF_SIZE, WRITE_BUF_SIZE>::check_event_loop_thread(const char* func) void TCPServer<READ_BUF_SIZE, WRITE_BUF_SIZE>::check_event_loop_thread(const char* func)
{ {
@ -374,6 +375,7 @@ void TCPServer<READ_BUF_SIZE, WRITE_BUF_SIZE>::check_event_loop_thread(const cha
LOGERR(1, func << " called from another thread, this is not thread safe"); LOGERR(1, func << " called from another thread, this is not thread safe");
} }
} }
#endif
template<size_t READ_BUF_SIZE, size_t WRITE_BUF_SIZE> template<size_t READ_BUF_SIZE, size_t WRITE_BUF_SIZE>
void TCPServer<READ_BUF_SIZE, WRITE_BUF_SIZE>::close_sockets(bool listen_sockets) void TCPServer<READ_BUF_SIZE, WRITE_BUF_SIZE>::close_sockets(bool listen_sockets)