summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/socketengine.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/socketengine.cpp b/src/socketengine.cpp
index bcc8e23af..976f578fd 100644
--- a/src/socketengine.cpp
+++ b/src/socketengine.cpp
@@ -40,6 +40,17 @@ SocketEngine::SocketEngine()
#ifdef USE_KQUEUE
EngineHandle = kqueue();
#endif
+#ifdef USE_SELECT
+ EngineHandle = 0;
+#endif
+ if (EngineHandle == -1)
+ {
+ log(SPARSE,"ERROR: Could not initialize socket engine. Your kernel probably does not have the proper features.");
+ log(SPARSE,"ERROR: this is a fatal error, exiting now.");
+ printf("ERROR: Could not initialize socket engine. Your kernel probably does not have the proper features.");
+ printf("ERROR: this is a fatal error, exiting now.");
+ Exit(0);
+ }
CurrentSetSize = 0;
}