diff --git a/src/tcp_server.inl b/src/tcp_server.inl index 942d3a5..0858433 100644 --- a/src/tcp_server.inl +++ b/src/tcp_server.inl @@ -1164,6 +1164,10 @@ void TCPServer::Client::close() template void TCPServer::Client::ban(uint64_t seconds) { + if (m_addr.is_localhost()) { + return; + } + if (m_owner) { LOGWARN(3, "peer " << static_cast(m_addrString) << " banned for " << seconds << " seconds"); m_owner->ban(m_addr, seconds);