chiark / gitweb /
progress: Disable the upload progress for now
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 16 May 2021 09:35:28 +0000 (10:35 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 16 May 2021 09:35:28 +0000 (10:35 +0100)
I have realised this can deadlock.  Fixing it seems to involve maybe
putting Tokio into otter(1) ...

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/progress.rs

index d395224c33bb515214afb385d743a5a0e7486709..7d234c229f751b40352171d0835bfb35cd58c37b 100644 (file)
@@ -155,10 +155,14 @@ impl<R:Read> Read for ReadOriginator<'_,R> {
   #[throws(io::Error)]
   fn read(&mut self, buf: &mut [u8]) -> usize {
     let got = self.r.read(buf)?;
+ if false {
+ // todo: this has a potential deadlock unless the client is concurrent
+ // todo: which it currently isn't, so disable it
     self.counter += got;
     if self.counter - self.last_report > 10000 {
       self.report();
     }
+ }
     got
   }
 }