Commit 6e40fbb
authored
websocket/stream: Fix unexpected EOF on
This PR updates the following dependencies:
- tokio tungstenite
- URL crate to facilitate the new tungstenite version
The tokio tungstenite update changed the API of webscoket messages,
which motivated the following changes:
- When`poll_ready` or `poll_flush` returned `Poll::Pending`, the
websocket state would forever remain poisoned.
- This has the side effect of returning `UnexpectedEof` on consecutive
calls, which led to the connection being terminated
- The state machine of the websocket is simplified to just 3 states
- Writer buffer and pointer are merged under one BytesMut instance
- `poll_read` implementation is simplified as well to make the code more
readable
---------
Signed-off-by: Alexandru Vasile <[email protected]>Poll::Pending state poisoning (#327)1 parent f6d02ff commit 6e40fbb
3 files changed
+175
-70
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
0 commit comments