capnproto / pycapnp

Cap'n Proto serialization/RPC system - Python bindings
BSD 2-Clause "Simplified" License
468 stars 124 forks source link

Fix retransmit bug for large messages causing message corruption #339

Closed LasseBlaauwbroek closed 11 months ago

LasseBlaauwbroek commented 11 months ago

Logic bug: We are looping over segments sent by the C++ library and sending them over a python transport. If the last message is larger than the transport pause threshold, this causes the transport to pause us. In that case, we forget to increment the current write_index, causing us to retransmit the same message in an infinite loop.

This is a serious bug, because it causes messages to become corrupted.