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

Fix issue with deletion of sessions during refresh() #2055

Merged
merged 2 commits into from
Feb 19, 2021

Conversation

bworrell
Copy link
Contributor

Description

Fixed an issue in TcpSessionHandler.refresh() where sessions may be skipped due to mutation of the list being iterated over.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

I added unit tests to confirm the undesired behavior and then implemented the fix (tests pass now).

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have added tests that prove my fix is effective or that my feature works

@bworrell
Copy link
Contributor Author

Gonna update the test to not use IsolatedAsyncioTestCase since it was added in 3.8

@bworrell bworrell marked this pull request as draft February 18, 2021 19:50
It's not available in all versions of Python we support.
@codecov
Copy link

codecov bot commented Feb 18, 2021

Codecov Report

Merging #2055 (b1b1f80) into master (0cbac0c) will increase coverage by 0.13%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2055      +/-   ##
==========================================
+ Coverage   61.74%   61.87%   +0.13%     
==========================================
  Files          60       60              
  Lines        4243     4247       +4     
==========================================
+ Hits         2620     2628       +8     
+ Misses       1623     1619       -4     
Impacted Files Coverage Δ
app/contacts/contact_tcp.py 47.82% <100.00%> (+6.91%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0cbac0c...b1b1f80. Read the comment docs.

@bworrell bworrell marked this pull request as ready for review February 18, 2021 20:14
@wbooth wbooth merged commit 2b6c935 into master Feb 19, 2021
@wbooth wbooth deleted the bworrell/bugfix/tcp-session-handler-refresh branch February 19, 2021 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants