mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-11-17 08:17:55 +00:00
TCPServer: don't spam logs with 127.0.0.1 bans
This commit is contained in:
parent
6baf5247cb
commit
de7bdba95f
1 changed files with 4 additions and 0 deletions
|
@ -1164,6 +1164,10 @@ void TCPServer<READ_BUF_SIZE, WRITE_BUF_SIZE>::Client::close()
|
|||
template<size_t READ_BUF_SIZE, size_t WRITE_BUF_SIZE>
|
||||
void TCPServer<READ_BUF_SIZE, WRITE_BUF_SIZE>::Client::ban(uint64_t seconds)
|
||||
{
|
||||
if (m_addr.is_localhost()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_owner) {
|
||||
LOGWARN(3, "peer " << static_cast<char*>(m_addrString) << " banned for " << seconds << " seconds");
|
||||
m_owner->ban(m_addr, seconds);
|
||||
|
|
Loading…
Reference in a new issue