From 86ec17f2ce4e6f668a0d6b9f1149cc4fbff47fe8 Mon Sep 17 00:00:00 2001 From: Andrew Cholakian Date: Tue, 15 Jan 2019 10:09:12 -0800 Subject: [PATCH] [Heartbeat] Fix NPE in HTTP responses. (#10083) This removes an accidentally duplicated line that broke the error check on the following line. I suspect this was caused by git merging incorrectly. Fixes https://github.com/elastic/beats/issues/10066 (cherry picked from commit 864b2223d2d933d645b0115d6f88c08172368457) --- heartbeat/monitors/active/http/simple_transp.go | 1 - 1 file changed, 1 deletion(-) diff --git a/heartbeat/monitors/active/http/simple_transp.go b/heartbeat/monitors/active/http/simple_transp.go index 21fef7f7f6af..889baa8e5a1e 100644 --- a/heartbeat/monitors/active/http/simple_transp.go +++ b/heartbeat/monitors/active/http/simple_transp.go @@ -184,7 +184,6 @@ func (t *SimpleTransport) readResponse( ) (*http.Response, error) { reader := bufio.NewReader(conn) resp, err := http.ReadResponse(reader, req) - resp.Body = comboConnReadCloser{conn, resp.Body} if err != nil { return nil, err }