From a532d917b90ec9b47c35707c8f2c69d16d1ddde4 Mon Sep 17 00:00:00 2001 From: Cameron Sparr Date: Mon, 21 Dec 2015 13:42:32 -0800 Subject: [PATCH] Fix httpjson panic for nil request body --- plugins/httpjson/httpjson.go | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/httpjson/httpjson.go b/plugins/httpjson/httpjson.go index b89f83576..40a771a91 100644 --- a/plugins/httpjson/httpjson.go +++ b/plugins/httpjson/httpjson.go @@ -182,7 +182,6 @@ func (h *HttpJson) sendRequest(serverURL string) (string, error) { if err != nil { return "", err } - defer req.Body.Close() resp, err := h.client.MakeRequest(req) if err != nil {