Commit edb10c6
committed
fix(session): prevent race condition during connection cleanup
Reorder the stop() method to cancel recv_task BEFORE closing the
connection. Previously, closing the connection first would set asyncio
transport callbacks to None while recv_worker() might still be reading,
causing 'TypeError: NoneType object is not callable' in
_SelectorSocketTransport._read_ready().1 parent 94f2b04 commit edb10c6
1 file changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
187 | | - | |
188 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
197 | 200 | | |
198 | 201 | | |
199 | 202 | | |
| |||
0 commit comments