diff options
author | Peter Powell <petpow@saberuk.com> | 2017-10-22 03:10:48 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2017-10-22 19:45:05 +0100 |
commit | 63e300ed082b82530ad5ae0949f45686746b7c9b (patch) | |
tree | 652448c5c2bd134df654b49b3aec7d82899abf64 /src/socketengines/socketengine_kqueue.cpp | |
parent | b1098712771ab823042fcf8614a706c76c2ff401 (diff) |
Deduplicate error handling in the socket engines.
Diffstat (limited to 'src/socketengines/socketengine_kqueue.cpp')
-rw-r--r-- | src/socketengines/socketengine_kqueue.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/socketengines/socketengine_kqueue.cpp b/src/socketengines/socketengine_kqueue.cpp index c969af1fd..b23cfbd9d 100644 --- a/src/socketengines/socketengine_kqueue.cpp +++ b/src/socketengines/socketengine_kqueue.cpp @@ -20,11 +20,10 @@ #include "inspircd.h" -#include "exitcodes.h" + #include <sys/types.h> #include <sys/event.h> #include <sys/time.h> -#include <iostream> #include <sys/sysctl.h> /** A specialisation of the SocketEngine class, designed to use BSD kqueue(). @@ -59,13 +58,7 @@ void SocketEngine::RecoverFromFork() */ EngineHandle = kqueue(); if (EngineHandle == -1) - { - ServerInstance->Logs->Log("SOCKET", LOG_DEFAULT, "ERROR: Could not initialize socket engine. Your kernel probably does not have the proper features."); - ServerInstance->Logs->Log("SOCKET", LOG_DEFAULT, "ERROR: this is a fatal error, exiting now."); - std::cout << "ERROR: Could not initialize socket engine. Your kernel probably does not have the proper features." << std::endl; - std::cout << "ERROR: this is a fatal error, exiting now." << std::endl; - ServerInstance->QuickExit(EXIT_STATUS_SOCKETENGINE); - } + InitError(); } /** Shutdown the kqueue engine |