JelleBouma / Johnny

Johnny is a blazingly fast HTTP server that serves files from memory
1 stars 0 forks source link

better handling of full output buffer #6

Closed JelleBouma closed 2 months ago

JelleBouma commented 2 months ago

right now when the output buffer is full we detect this as an error and close the connection prematurely reproducible on my machine by requesting 100x a 30Mb file

When this occurs we should save state (index & bytes sent?), continue with parsing request / other connections and then resume later (listen to epoll event that we are ready to continue?).

More info: https://stackoverflow.com/questions/14370489/what-can-cause-a-resource-temporarily-unavailable-on-sock-send-command