Skip to content

Conversation

@qt1
Copy link
Contributor

@qt1 qt1 commented Nov 7, 2020

This seems to fix #676
No signal is sent by OS if the client closes the connection prematurely so the http closes without stopping the program.

@yhirose yhirose closed this in 6adf130 Nov 8, 2020
@yhirose
Copy link
Owner

yhirose commented Nov 8, 2020

@qt1, thanks for the pull request. After I reviewed your code, I came up another way to solve this issue and committed it. Could you try with it? You should be able to handle this issue with -DCPPHTTPLIB_SEND_FLAGS=MSG_NOSIGNAL.
Thanks!

@qt1
Copy link
Contributor Author

qt1 commented Nov 8, 2020

Yes, it does work.
Thanks.

@sum01
Copy link
Contributor

sum01 commented Nov 8, 2020

@yhirose At the moment no optional definitions/flags are taken into account, and there are only Cmake options for using the dependencies and compilation.

Did you want this to be an option for all the flags via Cmake?

@yhirose
Copy link
Owner

yhirose commented Nov 8, 2020

@sum01, you are right. I think we don't have to do anything for it for now. Thanks for your comment!

ExclusiveOrange pushed a commit to ExclusiveOrange/cpp-httplib-exor that referenced this pull request May 2, 2023
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.

Misbahaving client causes program crash due to exception in send.c

3 participants