cpp-httplib icon indicating copy to clipboard operation
cpp-httplib copied to clipboard

Failed to write connection

Open HanChinese-LIURUI opened this issue 2 years ago • 4 comments

Hello, in actual use, httplib::Result will occasionally report this error Failed to write connection, what is the possible problem?

HanChinese-LIURUI avatar Sep 07 '24 02:09 HanChinese-LIURUI

To be honest, I don't know. The reason is that it varies depending on the individual network conditions (on the server side or the client side). What comes to mind is that either the socket on the other side was closed for some reason, or the network conditions are extremely poor.

yhirose avatar Sep 07 '24 02:09 yhirose

Ok, thank you for your answer

HanChinese-LIURUI avatar Sep 07 '24 02:09 HanChinese-LIURUI

I encountered a similar issue where the system returned error code 5 during network operations. This happened on Kylin Linux Desktop V10 (SP1).

In my case, the problem was caused by restrictions imposed by the Security Center - Network Protection module, which was blocking the process. After allowing the process through the security settings, the issue was resolved.

This is just for reference, but it may be worth checking whether network control policies or firewalls are blocking the process or the port being used.

lilucpp avatar Jul 04 '25 08:07 lilucpp

发自我的iPhone My situation is caused by the server disconnecting.

------------------ Original ------------------ From: lilucpp @.> Date: Fri,Jul 4,2025 4:20 PM To: yhirose/cpp-httplib @.> Cc: 刘锐 @.>, Author @.> Subject: Re: [yhirose/cpp-httplib] Failed to write connection (Issue #1924)

lilucpp left a comment (yhirose/cpp-httplib#1924)

I encountered a similar issue where the system returned error code 5 during network operations. This happened on Kylin Linux Desktop V10 (SP1).

In my case, the problem was caused by restrictions imposed by the Security Center - Network Protection module, which was blocking the process. After allowing the process through the security settings, the issue was resolved.

This is just for reference, but it may be worth checking whether network control policies or firewalls are blocking the process or the port being used.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

HanChinese-LIURUI avatar Jul 08 '25 14:07 HanChinese-LIURUI