Skip to content

Commit

Permalink
Fix crash by do http request
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyi committed Dec 30, 2024
1 parent 68ac4fe commit dc8c5be
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/flightRecorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,10 @@ class Recording {
httplib::Result result;
for (int i = 0; i < 3; i++) {
result = cli->Post("/profiling/v1/input", form);
if (result == NULL) {
Log::warn("unable to do http request: %s", result.error());
continue;
}
if (result->status / 100 == 2) {
break;
} else {
Expand Down

0 comments on commit dc8c5be

Please sign in to comment.