Skip to content

Conversation

@userhdisk
Copy link

if the grwprintf_t capacity is to small and the first snprintf failed do not count the first (snprintf) bytes as written

userhdisk and others added 2 commits January 31, 2021 20:04
if the  grwprintf_t capacity is to small and the first snprintf failed do not count the first (snprintf) bytes as written
When writing the answer to an HTTP request into the socket, the write might have to proceed in multiple parts. (E.g. if the receiver is not able to receive the data fast enough.) To deal with this situation, the server continues execution after a partial write, but changes the flag on the request's epoll object to trigger once the request's socket becomes writable again. However, once the response is fully written, the flags are not changed back, so that subsequent requests (for a keep-alive connection) do not trigger epoll, resulting in the server missing requests.
Fix broken connection after interrupted write.
@Arti171 Arti171 linked an issue Mar 30, 2023 that may be closed by this pull request
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

B

2 participants