Commit d45425d
Mirko Vogt
aiohttp: fix partial read on websocket resulting in truncated payload
Attempting to read N bytes from a socket does not guarantee to actually
read N bytes, even if >= N bytes were written onto the peer socket.
This especially becomes an issues when attempting to read larger
messages at once, which then potentially can't be read all at once,
resulting in truncated payloads.
Fix that by reading as long / often until expected length was actually
received.1 parent 3e8c309 commit d45425d
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
207 | 209 | | |
208 | 210 | | |
209 | 211 | | |
| |||
0 commit comments