File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ void Skipper::skip() const {
3838 return ;
3939 }
4040 if (int code = reply1->attribute (QNetworkRequest::HttpStatusCodeAttribute).toInt ();
41- code != 200 ) {
41+ code / 100 != 2 ) {
4242 SPDLOG_LOGGER_WARN (_logger, " Failed to get connection, http status code: {}" , code);
4343 reply1->deleteLater ();
4444 _logger->flush ();
@@ -86,7 +86,7 @@ void Skipper::skip() const {
8686
8787 if (int code = reply2->
8888 attribute (QNetworkRequest::HttpStatusCodeAttribute).
89- toInt (); code != 200 ) {
89+ toInt (); code / 100 != 2 ) {
9090 SPDLOG_LOGGER_WARN (
9191 _logger, " kill connection failed, http status code: {}" , code);
9292 reply2->deleteLater ();
@@ -120,7 +120,7 @@ void Skipper::test() {
120120 _logger->flush ();
121121 return ;
122122 }
123- if (reply->attribute (QNetworkRequest::HttpStatusCodeAttribute).toInt () != 200 ) {
123+ if (int code = reply->attribute (QNetworkRequest::HttpStatusCodeAttribute).toInt (); code / 100 != 2 ) {
124124 SPDLOG_LOGGER_WARN (_logger, " Failed to get version, http status code: {}" ,
125125 reply->errorString ().toStdString ());
126126 reply->deleteLater ();
You can’t perform that action at this time.
0 commit comments