aboutsummaryrefslogtreecommitdiff
path: root/src/zenhttp/httpsys.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/zenhttp/httpsys.cpp')
-rw-r--r--src/zenhttp/httpsys.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/zenhttp/httpsys.cpp b/src/zenhttp/httpsys.cpp
index c733d618d..25e4393b3 100644
--- a/src/zenhttp/httpsys.cpp
+++ b/src/zenhttp/httpsys.cpp
@@ -741,9 +741,19 @@ HttpSysServer::~HttpSysServer()
{
if (m_IsHttpInitialized)
{
+ ZEN_ERROR("~HttpSysServer() called without calling Close() first");
+ }
+}
+
+void
+HttpSysServer::Close()
+{
+ if (m_IsHttpInitialized)
+ {
Cleanup();
HttpTerminate(HTTP_INITIALIZE_SERVER, nullptr);
+ m_IsHttpInitialized = false;
}
}