evgenyigumnov / cblt

Safe and fast minimalistic web server, written in Rust, that serves files from a directory and proxies requests to another server.
MIT License
40 stars 7 forks source link

Catching runtime.block_on() errors #11

Open vdudouyt opened 2 weeks ago

vdudouyt commented 2 weeks ago

Another issue I got while experiencing the fdlimit problem with my own server software when running it in high-load production environment is unexpected returns from runtime.block_on(). It may be a good idea to log the runtime.block_on() errors if returned, and maybe even to restart it in a loop { } after 1 second rather than simply exiting as the last recovery point (although the latter may be depending on your software developer beliefs).