| 338 | } |
| 339 | |
| 340 | void FetchRequest::complete_error(const char* message) { |
| 341 | close_socket(); |
| 342 | mState = FAILED; |
| 343 | |
| 344 | if (mPromise.valid() && !mPromise.is_completed()) { |
| 345 | mPromise.complete_with_error(fl::task::Error(message)); |
| 346 | } |
| 347 | } |
| 348 | |
| 349 | void FetchRequest::close_socket() { |
| 350 | if (mSocketFd >= 0) { |
nothing calls this directly
no test coverage detected