Commit 2ce8b21
committed
Flush recv_buffer on cancellation
If asyncio.wait_for is cancelled by the caller we need to clean up
the recv_buffer as well.
We also need to guard self.response_future.set_result with a done()
check to prevent asyncio.exceptions.InvalidStateError: invalid state
errors.1 parent 528d70d commit 2ce8b21
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
156 | 159 | | |
157 | 160 | | |
158 | 161 | | |
| |||
194 | 197 | | |
195 | 198 | | |
196 | 199 | | |
197 | | - | |
| 200 | + | |
| 201 | + | |
198 | 202 | | |
199 | 203 | | |
200 | 204 | | |
| |||
0 commit comments