-
Notifications
You must be signed in to change notification settings - Fork 698
Description
One of the most common issues when implementing a network protocol is data truncation. This is frequent encountered on the client side when a fully received response blocked by temporary back pressure gets terminated part way due to a close event or an error. The ultimate cause is that inbound events do not respect back pressure and can be processed out-of-order with reads.
A robust protocol implementation needs to intercept all inbound events and buffer them, finish reading remaining data, then decide whether to forward the inbound events up or drop them. It is hard to exhaustively test all possible event ordering, so this code is often fragile.
I'm creating the issue to start a discussion on how we can help implementors avoid this common pitfall.