Skip to content

Commit

Permalink
Folly may throw WSACONNRESET
Browse files Browse the repository at this point in the history
As seen on CV we may end up with WSACONNRESET (and not
std::errc::connection_reset) from folly (without NETWORK_ERROR
category).

Change-Id: Iae410e1d4ef6dda796d79001e718eb1d10169591
Reviewed-on: http://review.couchbase.org/c/kv_engine/+/160404
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Richard de Mellow <richard.demellow@couchbase.com>
  • Loading branch information
trondn committed Aug 31, 2021
1 parent 6472520 commit 8acaf22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion protocol/connection/client_connection.cc
Expand Up @@ -68,7 +68,7 @@ static void handleFollyAsyncSocketException(
#ifdef WIN32
// To make it easier to write code on top of this treat
// the windows specific WSAECONNABORTED as reset
if (ex.getErrno() == WSAECONNABORTED) {
if (ex.getErrno() == WSAECONNABORTED || ex.getErrno() == WSAECONNRESET) {
throw std::system_error(
std::make_error_code(std::errc::connection_reset), ex.what());
}
Expand Down

0 comments on commit 8acaf22

Please sign in to comment.