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

Catch all exceptions when disposing PivSession #147

Merged
merged 2 commits into from
Aug 29, 2024
Merged

Conversation

DennisDyallo
Copy link
Collaborator

@DennisDyallo DennisDyallo commented Aug 27, 2024

Description

By catching all exceptions thrown by the SendCommand, we can properly dispose of the PivSession

Fixes: #104

Type of change

  • Refactor (non-breaking change which improves code quality or performance)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How has this been tested?

Tested as described in the above issue

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Test configuration:

  • OS version: win11
  • Firmware version: 5.7.2
  • Yubikey model1: USBA 5.7.2

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have run dotnet format to format my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Footnotes

  1. See Yubikey models (Multi-protocol, Security Key, FIPS, Bio, YubiHSM, YubiHSM FIPS)

@DennisDyallo DennisDyallo added the bug Something isn't working label Aug 27, 2024
@DennisDyallo DennisDyallo self-assigned this Aug 27, 2024
Copy link

github-actions bot commented Aug 27, 2024

Test Results: Windows

    2 files      2 suites   5s ⏱️
3 703 tests 3 703 ✅ 0 💤 0 ❌
3 705 runs  3 705 ✅ 0 💤 0 ❌

Results for commit e179465.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Aug 27, 2024

Test Results: Ubuntu

    2 files      2 suites   10s ⏱️
3 695 tests 3 695 ✅ 0 💤 0 ❌
3 697 runs  3 697 ✅ 0 💤 0 ❌

Results for commit e179465.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Aug 27, 2024

Test Results: MacOS

    2 files      2 suites   3s ⏱️
3 695 tests 3 695 ✅ 0 💤 0 ❌
3 697 runs  3 697 ✅ 0 💤 0 ❌

Results for commit e179465.

♻️ This comment has been updated with latest results.

Copy link

Code Coverage

Package Line Rate Branch Rate Complexity Health
Yubico.Core 42% 32% 4215
Yubico.YubiKey 50% 47% 19158
Summary 49% (32099 / 66063) 44% (8200 / 18585) 23373

Minimum allowed line rate is 40%

@DennisDyallo DennisDyallo merged commit 50bfafe into develop Aug 29, 2024
12 checks passed
@DennisDyallo DennisDyallo deleted the bugfix/104 branch August 29, 2024 10:55
@DennisDyallo DennisDyallo restored the bugfix/104 branch September 18, 2024 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

[BUG] PivSession.Dispose doesn't close Connection if Yubikey unplugged
2 participants