Commit dc29e48
committed
Move BufReader to caller
The original read_user_from_stream function from PR 1237 is a bad
pattern because it results in silently dropping any data left in the
buffer on return. If we want to read anything else from the same
TcpStream after the JSON object, the buffer needs to go in the caller.1 parent 29122f9 commit dc29e48
1 file changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2582 | 2582 | | |
2583 | 2583 | | |
2584 | 2584 | | |
2585 | | - | |
2586 | | - | |
2587 | | - | |
| 2585 | + | |
| 2586 | + | |
2588 | 2587 | | |
2589 | 2588 | | |
2590 | 2589 | | |
| |||
2595 | 2594 | | |
2596 | 2595 | | |
2597 | 2596 | | |
2598 | | - | |
2599 | | - | |
| 2597 | + | |
| 2598 | + | |
| 2599 | + | |
2600 | 2600 | | |
2601 | 2601 | | |
2602 | 2602 | | |
| |||
0 commit comments