diff --git a/.github/docker-images/integration-tests/ubuntu/Dockerfile b/.github/docker-images/integration-tests/ubuntu/Dockerfile index 85c2e789b..23fc2538c 100644 --- a/.github/docker-images/integration-tests/ubuntu/Dockerfile +++ b/.github/docker-images/integration-tests/ubuntu/Dockerfile @@ -14,9 +14,9 @@ RUN apt update && apt upgrade -y && \ RUN mkdir /home/dependencies WORKDIR /home/dependencies -RUN wget https://www.zlib.net/zlib-1.2.13.tar.gz -O /tmp/zlib-1.2.13.tar.gz && \ - tar xzvf /tmp/zlib-1.2.13.tar.gz && \ - cd zlib-1.2.13 && \ +RUN wget https://www.zlib.net/zlib-1.3.tar.gz -O /tmp/zlib-1.3.tar.gz && \ + tar xzvf /tmp/zlib-1.3.tar.gz && \ + cd zlib-1.3 && \ ./configure && \ make && \ make install && \ diff --git a/source/main.cpp b/source/main.cpp index 25b736c6f..59c085c76 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -237,6 +237,10 @@ namespace Aws case ClientBaseEventNotification::FEATURE_STOPPED: { LOGM_INFO(TAG, "%s has stopped", feature->getName().c_str()); +// Stopping DC instance if secure tunnel is closed for a ST component +#if defined(DISABLE_MQTT) + shutdown(); +#endif break; } default: diff --git a/source/tunneling/SecureTunnelingFeature.cpp b/source/tunneling/SecureTunnelingFeature.cpp index 8aef2341f..dbbdbf3c5 100644 --- a/source/tunneling/SecureTunnelingFeature.cpp +++ b/source/tunneling/SecureTunnelingFeature.cpp @@ -272,12 +272,15 @@ namespace Aws void SecureTunnelingFeature::OnConnectionShutdown(SecureTunnelingContext *contextToRemove) { LOG_DEBUG(TAG, "SecureTunnelingFeature::OnConnectionShutdown"); - +#if defined(DISABLE_MQTT) + this->stop(); +#else auto it = find_if(mContexts.begin(), mContexts.end(), [&](const unique_ptr &c) { return c.get() == contextToRemove; }); mContexts.erase(std::remove(mContexts.begin(), mContexts.end(), *it)); +#endif } } // namespace SecureTunneling