bcpierce00 / unison

Unison file synchronizer
GNU General Public License v3.0
4.01k stars 227 forks source link

Fix memory leak in `Lwt.choose` #855

Closed tleedjarv closed 1 year ago

tleedjarv commented 1 year ago

While this leak has always been present, it didn't mostly matter the way Lwt.choose was used so far. There was only one case (socket server) which was really impacted by this and even then you'd have to connect (tens or hundreds of) thousands of times to the same process for the leak to become practically harmful.

Now with the code for graceful stop of repeat mode (not yet merged), which also uses Lwt.choose, the leak becomes potentially scary. It's got to go for good.