Skip to content

Commit b3c1733

Browse files
authored
fix(proxy): ensure none response is sent on empty file (#1497)
Signed-off-by: chlins <chlins.zhang@gmail.com>
1 parent c352913 commit b3c1733

File tree

1 file changed

+6
-0
lines changed
  • dragonfly-client/src/proxy

1 file changed

+6
-0
lines changed

dragonfly-client/src/proxy/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -807,6 +807,12 @@ async fn proxy_via_dfdaemon(
807807
error!("writer shutdown error: {}", err);
808808
}
809809

810+
// Send the none response to the client in case if it is empty file.
811+
sender
812+
.send_timeout(None, REQUEST_TIMEOUT)
813+
.await
814+
.unwrap_or_default();
815+
810816
return;
811817
};
812818
let mut need_piece_number = first_piece.number;

0 commit comments

Comments
 (0)