Skip to content

Commit 04cadbd

Browse files
authored
Update HTTPClient.cpp
1 parent 81003a1 commit 04cadbd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Diff for: libraries/HTTPClient/src/HTTPClient.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,9 @@ bool HTTPClient::begin(NetworkClient &client, String url) {
142142
_secure = (protocol == "https");
143143

144144
#ifdef HTTPCLIENT_NOSECURE
145-
return _secure ? false : beginInternal(url, protocol.c_str());
146-
#else
147-
return beginInternal(url, protocol.c_str());
145+
if (_secure) return false;
148146
#endif // HTTPCLIENT_NOSECURE
147+
return beginInternal(url, protocol.c_str());
149148
}
150149

151150
/**

0 commit comments

Comments
 (0)