feat: Add cleanSession config, SDK v1.40.2 support, and Fedora build #526
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
This PR addresses MQTT connection reliability issues and adds support for the latest AWS IoT Device SDK C++ v2 (v1.40.2), along with improved build support for Fedora-based systems.
Background:
DUPLICATE_CLIENT_IDerrors during unclean service restartsIssue number: N/A (proactive improvements)
Modifications
Change summary
1. Configurable Clean Session Flag
clean-sessionboolean configuration option (defaults totrue)DUPLICATE_CLIENT_IDerrors by automatically disconnecting previous sessionsConfig.h,Config.cpp,config-template.json, and documentation2. AWS IoT Device SDK C++ v2 Update to v1.40.2
74c8b683to0d29d85a(v1.40.2)TcpForward.cppandSocket.hto use newaws_socket_connect_optionsstructure3. Improved MQTT Disconnect Handling
SharedCrtResourceManager::disconnect()with forced cleanup on timeout4. Enhanced Systemd Service Configuration
TimeoutStopSecto 30 seconds for graceful MQTT disconnectKillMode=mixedandSIGTERM→SIGKILLcascade5. Fedora Build Support
docker-build.shscript6. Additional Fixes
vfork()withfork()inJobEngine.cpp(more portable, safer)ConfigShadow.cpp.dockerignorefor cleaner Docker buildsRevision diff summary
This is the initial submission.
Testing
Is your change tested? If not, please justify the reason.
✅ Yes, changes have been tested locally.
Please list your testing steps and test results.
WIP: Working on updating/fixing the tests now
1. macOS ARM64 Build Test