Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DTLSSocket - destruction while handshaking lead to error #15111

Merged
merged 1 commit into from
Nov 17, 2021

Conversation

LukasKarel
Copy link
Contributor

@LukasKarel LukasKarel commented Sep 27, 2021

Summary of changes

When a DTLSSocket is deleted (destructor was called) while the handshake procedure is ongoing, a event is triggered after the timeout. This should not happen as the object is not valid anymore.

Impact of changes

Migration actions required

Documentation

None.


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers


@LukasKarel LukasKarel changed the title fix timeout event lead to OS error DTLSSocket - destruction while handshaking lead to error Sep 27, 2021
@ciarmcom ciarmcom added the release-type: patch Indentifies a PR as containing just a patch label Sep 27, 2021
@ciarmcom ciarmcom requested a review from a team September 27, 2021 13:30
@ciarmcom
Copy link
Member

@LukasKarel, thank you for your changes.
@ARMmbed/mbed-os-maintainers please review.

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add please information to the commit message (what is the issue about and how it fixes it).

Does this need also unittest addition?

… destructed. Fixed by removing timeout event from event queue on close/destruction.
@mergify mergify bot dismissed 0xc0170’s stale review September 28, 2021 09:10

Pull request has been modified.

@LukasKarel
Copy link
Contributor Author

Add please information to the commit message (what is the issue about and how it fixes it).

Does this need also unittest addition?

I am not sure how this should be tested correctly, because a server is needed which does not respond to a DTLS handshake request.

@0xc0170 0xc0170 requested a review from a team November 8, 2021 13:43
Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me but I would like to have connectivity team reviewed

@mergify mergify bot added needs: CI and removed needs: review labels Nov 8, 2021
@mbed-ci
Copy link

mbed-ci commented Nov 16, 2021

Jenkins CI Test : ✔️ SUCCESS

Build Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️

@0xc0170 0xc0170 merged commit 0db0445 into ARMmbed:master Nov 17, 2021
@mergify mergify bot removed the ready for merge label Nov 17, 2021
@mbedmain mbedmain added Release-pending and removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants