diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/uscxml/server/HTTPServer.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/uscxml/server/HTTPServer.cpp b/src/uscxml/server/HTTPServer.cpp index 2258ab0..358c819 100644 --- a/src/uscxml/server/HTTPServer.cpp +++ b/src/uscxml/server/HTTPServer.cpp @@ -173,7 +173,14 @@ HTTPServer* HTTPServer::getInstance(unsigned short port, unsigned short wsPort, evthread_use_windows_threads(); #endif _instance = new HTTPServer(port, wsPort, sslConf); - _instance->start(); + + // only start if we have something to do! +#if (defined EVENT_SSL_FOUND && defined OPENSSL_FOUND && defined OPENSSL_HAS_ELIPTIC_CURVES) + if (_instance->_httpHandle || _instance->_wsHandle || _instance->_sslHandle) +#else + if (_instance->_httpHandle || _instance->_wsHandle) +#endif + _instance->start(); } return _instance; } |