mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-13 18:03:10 -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.
|
// 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.
|
// It then closes the given channel and returns.
|
||||||
func (r *Request) DoUntilSuccess(done chan error) {
|
func (r *Request) DoUntilSuccess(done chan error) {
|
||||||
|
r.LastErr = &LastRequestErr{}
|
||||||
for {
|
for {
|
||||||
if err := r.Do(); err != nil {
|
if err := r.Do(); err != nil {
|
||||||
r.LastErr.Set(err)
|
r.LastErr.Set(err)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue