diff --git a/samples/jobs/mqtt5_job_execution/main.cpp b/samples/jobs/mqtt5_job_execution/main.cpp index 6870d54f7..760e22f77 100644 --- a/samples/jobs/mqtt5_job_execution/main.cpp +++ b/samples/jobs/mqtt5_job_execution/main.cpp @@ -257,13 +257,11 @@ int main(int argc, char *argv[]) // Wait just a little bit to let the console print std::this_thread::sleep_for(std::chrono::milliseconds(500)); - // Disconnect if (connection->Disconnect()) { connectionClosedPromise.get_future().wait(); } - return 0; } @@ -342,17 +340,4 @@ void updateJobExecution( jobsClient.PublishUpdateJobExecution(publishRequest, AWS_MQTT_QOS_AT_LEAST_ONCE, publishHandler); pendingExecutionPromise.get_future().wait(); -} - } - - // Wait just a little bit to let the console print - std::this_thread::sleep_for(std::chrono::milliseconds(500)); - - // Disconnect - if (client->Stop()) - { - stoppedPromise.get_future().wait(); - } - - return 0; }