mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-10 16:33:11 -06:00
common/test/client: Fix uninitialised LastRequestErr
This commit is contained in:
parent
935f3275b9
commit
9b887aa696
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue