chiark / gitweb /
cmdlistener: Add a command about timeouts and bundle processing
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 20 May 2021 02:10:30 +0000 (03:10 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 20 May 2021 13:26:23 +0000 (14:26 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
daemon/cmdlistener.rs

index 363ab057764516f728f5fcf7124f2b18b7c5940e..309ca628fab9dea81489fe69143919542d7b2b4b 100644 (file)
@@ -266,6 +266,11 @@ fn execute_and_respond<W>(cs: &mut CommandStreamData, cmd: MgmtCommand,
         )?
       };
       bulk_upload.inner_mut().set_timeout(Some(UPLOAD_TIMEOUT));
+      // If the timeout fires after the bulk data has all arrived, it
+      // won't take effect, because: it only takes effect when we try
+      // to read from the stresm, and after we have the data, we
+      // won't read again until we go on to the next command - which
+      // will have its own timeout.
       let uploaded = upload.bulk(bulk_upload, size,
                                  &hash, progress, &mut for_response)?;
       let bundle = {