You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently each peer listen-loop is awaiting on several possible events, and one of them is the incoming messages from a socket.
Since this await is inside a select! macro, and it is not cancel-safe, it can get cancelled in the middle of a messages being received and the message will be lost.
We should detach this process of message reading from the main listen-loop and instead have a process that reads the socket and pushes a message into a cancel-safe channel for the peer listen-loop to handle it.
The text was updated successfully, but these errors were encountered:
Currently each peer listen-loop is awaiting on several possible events, and one of them is the incoming messages from a socket.
Since this
await
is inside aselect!
macro, and it is not cancel-safe, it can get cancelled in the middle of a messages being received and the message will be lost.We should detach this process of message reading from the main listen-loop and instead have a process that reads the socket and pushes a message into a cancel-safe channel for the peer listen-loop to handle it.
The text was updated successfully, but these errors were encountered: