Inspired by Coverity. CID
1441988: Useless call (USELESS_CALL).
{
assert(fd_table);
- /* make sure the accept() socket FIFO delay queue exists */
- Comm::AcceptLimiter::Instance();
-
// make sure the IO pending callback table exists
Comm::CallbackTableInit();
#include "fde.h"
#include "globals.h"
-Comm::AcceptLimiter Comm::AcceptLimiter::Instance_;
-
Comm::AcceptLimiter &
Comm::AcceptLimiter::Instance()
{
- return Instance_;
+ static const auto Instance_ = new AcceptLimiter();
+ return *Instance_;
}
void
void kick();
private:
- static AcceptLimiter Instance_;
-
/** FIFO queue */
std::deque<TcpAcceptor::Pointer> deferred_;
};