Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
lxd/rsync: Tweaks Recv's internal synchronisation to avoid race #6389
This is just a hunch as to the possible cause of the race condition in rsync.Recv.
I believe the function go be exiting early (because the 2 synchronisation channels are filled with an error value) meaning the Recv function exists before the go routines, and in the situation where the Recv function is called immediately afterwards (when transferring multiple volume snapshots) and using a new wrapper of WebsocketIO (with its own lock) this could cause multiple writers to the parent websocket conn concurrently.
Signed-off-by: Thomas Parrott email@example.com