Skip to content
Snippets Groups Projects
Commit d4311925 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

dhtrunner: shutdown: return if not running

parent 9aa56dd4
No related branches found
No related tags found
No related merge requests found
...@@ -188,6 +188,10 @@ DhtRunner::run(const SockAddr& local4, const SockAddr& local6, const DhtRunner:: ...@@ -188,6 +188,10 @@ DhtRunner::run(const SockAddr& local4, const SockAddr& local6, const DhtRunner::
void void
DhtRunner::shutdown(ShutdownCallback cb) { DhtRunner::shutdown(ShutdownCallback cb) {
if (not running) {
cb();
return;
}
#ifdef OPENDHT_PROXY_CLIENT #ifdef OPENDHT_PROXY_CLIENT
if (dht_via_proxy_) if (dht_via_proxy_)
dht_via_proxy_->shutdown(cb); dht_via_proxy_->shutdown(cb);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment