diff --git a/src/jamidht/jamiaccount.cpp b/src/jamidht/jamiaccount.cpp
index c2a61b7971fd139b81ace265dfedf6e2eca3cb2e..48d1c4205180cf8dfac5cec397aa1a2d1a4e0e24 100644
--- a/src/jamidht/jamiaccount.cpp
+++ b/src/jamidht/jamiaccount.cpp
@@ -1493,7 +1493,7 @@ JamiAccount::registerAsyncOps()
             auto oldPort = static_cast<in_port_t>(dhtPortUsed_);
             auto newPort = success ? port_used : dhtPort_;
             if (*update) {
-                if (oldPort != newPort) {
+                if (oldPort != newPort or not dht_->isRunning()) {
                     JAMI_WARN("[Account %s] DHT port changed to %u: restarting network", getAccountID().c_str(), newPort);
                     dht_->connectivityChanged();
                 }