From ad3714b7069ff8a90db8255574086a20f7ceb61d Mon Sep 17 00:00:00 2001 From: Benjamin Wenger <ben@elixxir.ioo> Date: Mon, 10 May 2021 13:45:42 -0700 Subject: [PATCH] fixed bug in handling resending requests after request sending error --- auth/request.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/auth/request.go b/auth/request.go index bfb2a6c69..76af99478 100644 --- a/auth/request.go +++ b/auth/request.go @@ -57,10 +57,13 @@ func RequestAuth(partner, me contact.Contact, message string, rng io.Reader, if err == nil { if rqType == auth.Receive { - return 0, errors.WithMessage(err, - "Cannot send a request after receiving a request") + return 0, errors.Errorf("Cannot send a request after " + + "receiving a request") } else if rqType == auth.Sent { resend = true + }else{ + return 0, errors.Errorf("Cannot send a request after " + + " a stored request with unknown rqType: %d", rqType) } }else if !strings.Contains(err.Error(), auth.NoRequest){ return 0, errors.WithMessage(err, -- GitLab