fix stall detection to actually work when fully stalled
authorJoey Hess <joeyh@joeyh.name>
Fri, 11 Dec 2020 22:26:30 +0000 (18:26 -0400)
committerJoey Hess <joeyh@joeyh.name>
Fri, 11 Dec 2020 22:28:46 +0000 (18:28 -0400)
commit0d0f6d9c23a3398921b41d1f5b76bd061eaa6861
treee444a689196b159f6c6078cc4760c5515ea299ce
parent3e608dfc1379bc197c6c6fb1a30369700516acf0
fix stall detection to actually work when fully stalled

When fully stalled, the progress bar doesn't update, so waiting on a
MVar would block forever. There's no need to wait anyway, just wake up
after sleeping the configured period and check the current value.

Luckily Viasat makes it really easy for me to notice this kind of
mistake, by stalling long TCP connections frequently.
Annex/TransferrerPool.hs