From 59a1b52242b37e1202610eedfc2e4769215a3357 Mon Sep 17 00:00:00 2001 From: mr Date: Fri, 18 Oct 2024 08:51:12 +0200 Subject: [PATCH] nats discovery --- tools/remote_caller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/remote_caller.go b/tools/remote_caller.go index a444427..4d05476 100644 --- a/tools/remote_caller.go +++ b/tools/remote_caller.go @@ -65,7 +65,7 @@ func (caller *HTTPCaller) CallGet(url string, subpath string) ([]byte, error) { // CallPut calls the DELETE method on the HTTP server func (caller *HTTPCaller) CallDelete(url string, subpath string) ([]byte, error) { resp, err := http.NewRequest("DELETE", url+subpath, nil) - if err != nil { + if err != nil || resp == nil || resp.Body == nil { return nil, err } defer resp.Body.Close()