Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

Restore connection on network errors #1313

Closed
wants to merge 3 commits into from
Closed

Restore connection on network errors #1313

wants to merge 3 commits into from

Conversation

evgenymarkov
Copy link

@evgenymarkov evgenymarkov commented Mar 4, 2022

Problem

If the application is isolated from the Internet, and then access to the Internet is returned, it will no longer recover due to the fact that it will use broken connections.

What do these changes do?

Broken connections in which the StreamReader has an exception (e.g. OSError No route to host) are removed from the connection pool and are no longer reused.

Are there changes in behavior for the user?

Broken connections will be removed from connection pools.

@evgenymarkov
Copy link
Author

I created issue #1314

@codecov
Copy link

codecov bot commented Mar 5, 2022

Codecov Report

Merging #1313 (70f9d06) into master (19be499) will decrease coverage by 0.01%.
The diff coverage is 95.12%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1313      +/-   ##
==========================================
- Coverage   90.75%   90.74%   -0.02%     
==========================================
  Files          21       21              
  Lines        6947     6988      +41     
  Branches      889      894       +5     
==========================================
+ Hits         6305     6341      +36     
- Misses        469      471       +2     
- Partials      173      176       +3     
Flag Coverage Δ
unit 90.65% <95.12%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aioredis/connection.py 77.32% <85.71%> (+0.02%) ⬆️
tests/test_connection_pool.py 99.41% <100.00%> (+0.03%) ⬆️
aioredis/client.py 82.41% <0.00%> (-0.11%) ⬇️

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 19be499...70f9d06. Read the comment docs.

@evgenymarkov evgenymarkov changed the title Drop broken connections after network errors Restore connection on network errors Mar 5, 2022
@evgenymarkov evgenymarkov deleted the network-errors branch June 22, 2022 03:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant