Commit fbed0b8
committed
fix: tolerate removing unregistered listener (GHSA-5pv9-xcmm-gqc7)
self.listeners is a set, so .remove() raises KeyError, never ValueError —
the existing except clause could not catch the only realistic failure
mode. Switch to the set-native discard idiom so removing a listener that
was never registered (e.g. during teardown / reconnect sequences) no
longer breaks the shutdown flow.1 parent cd765e8 commit fbed0b8
1 file changed
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
218 | | - | |
| 217 | + | |
| 218 | + | |
219 | 219 | | |
220 | | - | |
221 | | - | |
0 commit comments