From a282bc588b65da09a6a9e8bb335f2a25182ff73a Mon Sep 17 00:00:00 2001 From: G2-Games Date: Sat, 22 Mar 2025 16:14:55 -0500 Subject: [PATCH] Made websocket automatically finish when all bytes have been uploaded --- confetti-box/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/confetti-box/src/lib.rs b/confetti-box/src/lib.rs index c85053e..0a2c8c9 100644 --- a/confetti-box/src/lib.rs +++ b/confetti-box/src/lib.rs @@ -301,7 +301,7 @@ pub async fn websocket_upload( let message = message.unwrap().into_data(); offset += message.len() as u64; - if (offset > info.1.size) | (offset > max_filesize) { + if (offset >= info.1.size) | (offset > max_filesize) { break }