[impl] isRunning call for Http server to check whether it is still running
[impl] Ability to update system files of the update program
This commit is contained in:
parent
4eac37cfae
commit
3e3de79dca
@ -746,6 +746,7 @@ public:
|
||||
public:
|
||||
void run()
|
||||
{
|
||||
std::lock_guard<std::mutex> scopeGuard(m_mutex);
|
||||
// Create and launch a listening port
|
||||
std::make_shared<listener>(
|
||||
m_ioc,
|
||||
@ -766,6 +767,7 @@ public:
|
||||
|
||||
void shutdown()
|
||||
{
|
||||
std::lock_guard<std::mutex> scopeGuard(m_lock);
|
||||
m_ioc.stop();
|
||||
for (auto& t : m_threads)
|
||||
{
|
||||
@ -774,12 +776,18 @@ public:
|
||||
m_threads.clear();
|
||||
}
|
||||
|
||||
bool isRunning() const
|
||||
{
|
||||
return m_ioc.stopped();
|
||||
}
|
||||
|
||||
void clearCache()
|
||||
{
|
||||
m_etagCache.clear();
|
||||
}
|
||||
|
||||
private:
|
||||
mutable std::mutex m_lock;
|
||||
int m_maxThreads;
|
||||
std::string m_docRoot;
|
||||
etag_cache m_etagCache;
|
||||
@ -813,3 +821,7 @@ void CCServer::run()
|
||||
m_impl->run();
|
||||
}
|
||||
|
||||
bool CCServer::isRunning() const
|
||||
{
|
||||
return m_impl->isRunning();
|
||||
}
|
||||
|
||||
@ -16,6 +16,7 @@ public:
|
||||
|
||||
public:
|
||||
void run();
|
||||
bool isRunning() const;
|
||||
void shutdown();
|
||||
void clearCache();
|
||||
|
||||
|
||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user