capnproto / pycapnp

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

Prevent race condition in example code #305

Closed edevil closed 1 year ago

edevil commented 1 year ago

The example async server code uses timeouts around read() operations. However, this has a race condition where data can be read, the timeout fires, and the data is lost.

These timeouts are not really needed in this example code, so I removed them to prevent people from having strange issues with lost messages and undefined RPC behavior when using the example code.

haata commented 1 year ago

Thanks!