Repository navigation
Commit 37ecec1
committed
fix(core): only swallow CancelledError from setup, not all setup errors
Copilot review on #1706: ``gather(return_exceptions=True)`` was too
broad — it would have hidden a genuine setup failure (e.g. a socket
bind error in ``_async_create_endpoints``) during close. Switch back
to ``try/await/except CancelledError`` and gate the swallow on
``self._setup_task.cancelled()``; that's True only when the task
itself was cancelled (the close-before-start case we want to absorb),
so outer-task cancellation and non-cancel setup exceptions both
propagate.
Also update the
``test_service_browser_listeners_no_update_service`` docstring to
describe what the test now actually asserts — that a listener which
ignores update events records only add/remove callbacks — since the
listener now provides an explicit no-op ``update_service``.1 parent 75d7056 commit 37ecec1
2 files changed
Lines changed: 12 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
154 | 160 | | |
155 | 161 | | |
156 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1033 | 1033 | | |
1034 | 1034 | | |
1035 | 1035 | | |
1036 | | - | |
| 1036 | + | |
1037 | 1037 | | |
1038 | 1038 | | |
1039 | 1039 | | |
| |||
0 commit comments