hydro-project / hydroflow

Hydro's low-level dataflow runtime
https://hydro.run/docs/hydroflow/
Apache License 2.0
477 stars 34 forks source link

Race condition in TCP & WebSockets Stack #1458

Open rohitkulshreshtha opened 1 month ago

rohitkulshreshtha commented 1 month ago

The bind_tcp method has a race condition. The client is removed from the hashmap and and back to it across an await() boundary. This leaves the client map inconsistent when execution awaits at the await point (the client exists but cannot be found in the map).

Since the newly introduced WebSockets examples rely on the same patterns as TCP, they also have the same race condition.

MingweiSamuel commented 17 hours ago

1446