mirror of
https://github.com/znc/znc.git
synced 2026-08-01 06:23:32 +02:00
Broadcast an error on EMFILE
When we hit the "maximum open files" limit, we close the listener that hit this error. Previously we did so silently which means no one could figure out what happened. This commits adds a broadcast message giving a hint, but this should never happen in a real-world situation anyway (unless you have 1000 users). Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
@@ -69,6 +69,9 @@ void CRealListener::SockError(int iErrno) {
|
||||
if (iErrno == EMFILE) {
|
||||
// We have too many open fds, let's close this listening port to be able to continue
|
||||
// to work, next rehash will (try to) reopen it.
|
||||
CZNC::Get().Broadcast("We hit the FD limit, closing listening socket on ["
|
||||
+ GetLocalIP() + " : " + CString(GetLocalPort()) + "]");
|
||||
CZNC::Get().Broadcast("An admin has to rehash to reopen the listening port");
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user