mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-29 18:51:22 +00:00
* Require remaining negotiation data to be flushed. There appears to still be an edge-case whereby the `remaining` data to send w.r.t. protocol negotiation to send is successfully written before a `poll_read` on a `Negotiated` stream, but where the subsequent `poll_flush()` is pending. Now `remaining` is empty and the next `poll_read()` will go straight to reading from the underlying I/O stream, despite the flush not having happened yet, which can lead to a form of deadlock during protocol negotiation. Rather than complicating the existing code further in order to accommodate for this case, it seems preferable to simplify the code by giving up on this optimisation that only affects the last negotiation protocol message sent by the "listener". So we give up on the ability to combine data sent by the "listener" immediately after protocol negotiation together with the final negotiation frame in the same transport-level frame/packet. * Update changelog. * Add missing comma.