mirror of
https://github.com/prometheus/prometheus
synced 2025-01-11 17:19:45 +00:00
Fix multiple response.WriteHeader calls error in remote read adapter (#5159)
* fix multiple response.WriteHeader calls in remote read adapter * remove useless return Signed-off-by: qinng <guoruyi1@xiaomi.com>
This commit is contained in:
parent
e5dbac7972
commit
cc75c27580
@ -296,8 +296,7 @@ func serve(logger log.Logger, addr string, writers []writer, readers []reader) e
|
||||
|
||||
compressed = snappy.Encode(nil, data)
|
||||
if _, err := w.Write(compressed); err != nil {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
level.Warn(logger).Log("msg", "Error writing response", "storage", reader.Name(), "err", err)
|
||||
}
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user