You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When sending files either by downloading them from the public folder as well as using the http_sendfile2 function, the timeout still applies to the request and cancels it if the download takes longer than the timeout allows.
Solutions/Workarounds
Although this problem can be mitigated by setting the timeout in general or the timeout for the specific request to a long duration, this solution can still cause problems because it would not dynamically adapt to the bandwidth of different clients. Another solution could be to use fio_touch, but I did not implement a working example for this approach.
Setup
Raspberry Pi 5 with Raspberry Pi OS (debian bookworm port) 64 bit
facil io version 0.7.6
C compiler: gcc 12.2.0 "cc (Debian 12.2.0-14) 12.2.0"
C linker: cc ld.bfd 2.40
Using meson build
Running fio with (could add the long timeout for the mentioned solution)
// listen on port 3000 and any available network binding (NULL == 0.0.0.0)http_listen("3000", NULL,
.on_request=on_request,
.on_upgrade=on_http_upgrade,
.log=loglevel,
.public_folder=public_folder);
// start the serverfio_start(.threads=2);
Problem
When sending files either by downloading them from the public folder as well as using the http_sendfile2 function, the timeout still applies to the request and cancels it if the download takes longer than the timeout allows.
Solutions/Workarounds
Although this problem can be mitigated by setting the timeout in general or the timeout for the specific request to a long duration, this solution can still cause problems because it would not dynamically adapt to the bandwidth of different clients. Another solution could be to use fio_touch, but I did not implement a working example for this approach.
Setup
Running fio with (could add the long timeout for the mentioned solution)
Sending files with this function
Notes
I am not that experienced with the library. If i missed any functionality or setup to solve this problem please let me know.
The text was updated successfully, but these errors were encountered: