From 9b887aa696d3e9e8ee01c23cb0b9ac7905ceab0d Mon Sep 17 00:00:00 2001 From: Robert Swain Date: Wed, 7 Jun 2017 18:26:24 +0200 Subject: [PATCH] common/test/client: Fix uninitialised LastRequestErr --- src/github.com/matrix-org/dendrite/common/test/client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/github.com/matrix-org/dendrite/common/test/client.go b/src/github.com/matrix-org/dendrite/common/test/client.go index 839f9b336..c8d2a3037 100644 --- a/src/github.com/matrix-org/dendrite/common/test/client.go +++ b/src/github.com/matrix-org/dendrite/common/test/client.go @@ -101,6 +101,7 @@ func (r *Request) Do() error { // DoUntilSuccess blocks and repeats the same request until the response returns the desired status code and body. // It then closes the given channel and returns. func (r *Request) DoUntilSuccess(done chan error) { + r.LastErr = &LastRequestErr{} for { if err := r.Do(); err != nil { r.LastErr.Set(err)