diff --git a/contrib/src/restbed/dns-resolution-error.patch b/contrib/src/restbed/dns-resolution-error.patch new file mode 100644 index 0000000000000000000000000000000000000000..e645e57242f8d213b1919507cfce6835693e6897 --- /dev/null +++ b/contrib/src/restbed/dns-resolution-error.patch @@ -0,0 +1,31 @@ +From: Adrien Beraud <adrien.beraud@savoirfairelinux.com> +Date: Fri, 2 Jun 2017 11:24:12 +0200 +Subject: [PATCH] Handle DNS resolution error + +DNS resolution error currently causes +indefinite hangup as the callback is +not called and higher-level layers +are not informed. + +This commit bubbles up the error, +allowing the request to fail. +--- + source/corvusoft/restbed/detail/socket_impl.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/source/corvusoft/restbed/detail/socket_impl.cpp b/source/corvusoft/restbed/detail/socket_impl.cpp +index 313a421..665cfe7 100644 +--- a/source/corvusoft/restbed/detail/socket_impl.cpp ++++ b/source/corvusoft/restbed/detail/socket_impl.cpp +@@ -145,6 +145,8 @@ namespace restbed + m_is_open = true; + callback( error ); + } ); ++ } else { ++ callback( error ); + } + } ); + } +-- +2.11.0 + diff --git a/contrib/src/restbed/rules.mak b/contrib/src/restbed/rules.mak index 38b655c5a2e267221daecbd114afd3473272dbcb..89c6b0d0a6e57e30fe25e4a249649ba34d404017 100644 --- a/contrib/src/restbed/rules.mak +++ b/contrib/src/restbed/rules.mak @@ -44,6 +44,7 @@ restbed: restbed-$(RESTBED_VERSION).tar.gz $(APPLY) $(SRC)/restbed/CMakeLists.patch $(APPLY) $(SRC)/restbed/strand.patch $(APPLY) $(SRC)/restbed/uri_cpp.patch + $(APPLY) $(SRC)/restbed/dns-resolution-error.patch $(MOVE) .restbed: restbed toolchain.cmake