Commit 7a44d00 1 parent b28b492 commit 7a44d00 Copy full SHA for 7a44d00
File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -55,9 +55,7 @@ void Fetch::Receiver::process(Event *evt) {
55
55
m_body->push (*data);
56
56
}
57
57
} else if (evt->is <MessageEnd>() || evt->is <StreamEnd>()) {
58
- if (m_body) {
59
- m_fetch->on_response (m_head, m_body);
60
- }
58
+ m_fetch->on_response (m_head, m_body);
61
59
m_head = nullptr ;
62
60
m_body = nullptr ;
63
61
}
Original file line number Diff line number Diff line change @@ -277,19 +277,21 @@ class StatusReporter : public PeriodicJob {
277
277
m_url->path (),
278
278
m_headers,
279
279
Data::make (std::move (buffer)),
280
- [=](http::ResponseHead *head, Data *body ) {
280
+ [=](http::ResponseHead *head, Data *) {
281
281
m_local_ip = m_fetch->outbound ()->local_address ()->str ();
282
282
283
+ auto status = head ? head->status : 0 ;
284
+
283
285
// "206 Partial Content" is used by a "smart" repo
284
286
// to indicate that subsequent metric reports can be incremental
285
- if (head-> status != 206 ) {
287
+ if (status != 206 ) {
286
288
m_initial_metrics = true ;
287
289
}
288
290
289
291
Log::debug (
290
292
Log::CODEBASE,
291
293
" [codebase] Sent status report in %dms (size = %d, response = %d)" ,
292
- int (utils::now () - time ), size, head-> status
294
+ int (utils::now () - time ), size, status
293
295
);
294
296
}
295
297
);
You can’t perform that action at this time.
0 commit comments