mirror of https://github.com/kiwix/libkiwix.git
Stop the internal server only if it exists.
This commit is contained in:
parent
de6b8ba4de
commit
61f9d4ab3a
|
@ -53,9 +53,11 @@ bool Server::start() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Server::stop() {
|
void Server::stop() {
|
||||||
|
if (mp_server) {
|
||||||
mp_server->stop();
|
mp_server->stop();
|
||||||
mp_server.reset(nullptr);
|
mp_server.reset(nullptr);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Server::setRoot(const std::string& root)
|
void Server::setRoot(const std::string& root)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue