Skip to content

feat: silence ConnectionReset errors - #209

Closed
rwakulszowa wants to merge 1 commit into
aio-libs:masterfrom
rwakulszowa:feat/silence-connection-reset-error
Closed

feat: silence ConnectionReset errors#209
rwakulszowa wants to merge 1 commit into
aio-libs:masterfrom
rwakulszowa:feat/silence-connection-reset-error

Conversation

@rwakulszowa

Copy link
Copy Markdown
Contributor

What do these changes do?

The previous implementation would print a verbose error message whenever a session ends:

Traceback (most recent call last):
  File ".../src/aioftp/server.py", line 1013, in dispatcher
    result = task.result()
  File ".../src/aioftp/server.py", line 917, in parse_command
    raise ConnectionResetError
ConnectionResetError

It's not exactly necessary: the (default) logger prints an informative message anyway:

[14:44:51]: [aioftp.server] closing connection from 127.0.0.1:48034

Are there changes in behavior for the user?

Less error-like logs whenever a connection ends

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes

The previous implementation would print a verbose error message
whenever a session ends:
```
Traceback (most recent call last):
  File ".../src/aioftp/server.py", line 1013, in dispatcher
    result = task.result()
  File ".../src/aioftp/server.py", line 917, in parse_command
    raise ConnectionResetError
ConnectionResetError
```

It's not exactly necessary: the (default) logger prints an
informative message anyway:
> [14:44:51]: [aioftp.server] closing connection from 127.0.0.1:48034
@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.90%. Comparing base (4552c2d) to head (7ee7ad7).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #209      +/-   ##
==========================================
- Coverage   97.94%   97.90%   -0.05%     
==========================================
  Files           6        6              
  Lines        2094     2097       +3     
==========================================
+ Hits         2051     2053       +2     
- Misses         43       44       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rwakulszowa

Copy link
Copy Markdown
Contributor Author

Nevermind, it works fine when the connection is closed cleanly. My bad, wrong testing setup.

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.

1 participant