Skip to content

Commit b3aa2e6

Browse files
committed
Addressed review comments
1 parent 169ec48 commit b3aa2e6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Release/tests/functional/http/client/outside_tests.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
#include "cpprest/rawptrstream.h"
2828
#include "os_utilities.h"
2929
#include <stdexcept>
30+
#if defined(_MSC_VER) && !defined(__cplusplus_winrt)
31+
#include <winhttp.h>
32+
#endif
3033

3134
using namespace web;
3235
using namespace utility;
@@ -206,9 +209,13 @@ TEST_FIXTURE(uri_address, outside_ssl_json)
206209
}
207210
catch (web::http::http_exception const& e)
208211
{
209-
if (e.what() != "Error in: WinHttpQueryDataAvailable" || i == 3)
212+
#if defined(_MSC_VER) && !defined(__cplusplus_winrt)
213+
if (e.error_code != API_QUERY_DATA_AVAILABLE || i == 3)
214+
#endif
215+
{
210216
// If we didn't get a "connection broken" error (or we are on the last retry), rethrow it
211217
throw;
218+
}
212219
os_utilities::sleep(1000);
213220
}
214221
}

0 commit comments

Comments
 (0)