Skip to content

Commit e77abef

Browse files
committed
Add more ASIO error mapping code for apple
1 parent 656898a commit e77abef

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Release/src/http/client/http_linux.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,14 @@ namespace web { namespace http
7373
// We need to correct inaccurate ASIO error code base on context information
7474
switch (context)
7575
{
76+
#if defined(__APPLE__)
77+
case httpclient_errorcode_context::writeheader:
78+
if (ec == boost::system::errc::broken_pipe)
79+
errorcodeValue = make_error_code(std::errc::host_unreachable).value();
80+
break;
81+
#endif
7682
case httpclient_errorcode_context::connect:
77-
if (ec == boost::system::errc::connection_refused)
83+
if (ec == boost::system::errc::connection_refused)
7884
errorcodeValue = make_error_code(std::errc::host_unreachable).value();
7985
break;
8086
case httpclient_errorcode_context::readheader:

0 commit comments

Comments
 (0)