Skip to content
Snippets Groups Projects
Commit 19d83e5e authored by Richard T. Carback III's avatar Richard T. Carback III
Browse files

Merge branch 'fix-single-use-crash' into 'release'

Handle empty rounds list when getting round URL in single use request timeout

See merge request !695
parents 5fa0c47a e3a038d2
No related branches found
No related tags found
1 merge request!695Handle empty rounds list when getting round URL in single use request timeout
......@@ -104,7 +104,8 @@ bindings-ios:
tags:
- ios
script:
- export PATH=$PATH:$HOME/go/bin
- export PATH=/opt/homebrew/bin:$PATH:$HOME/go/bin
- mc --version
- go mod tidy
- rm -rf vendor/
- go build ./...
......
......@@ -255,9 +255,15 @@ func (sr singleUseResponse) Callback(payload []byte,
for _, r := range rounds {
rids = append(rids, r.ID)
}
// If the callback get's called on a timed out request, the rounds list will be
// empty. In this case, roundURL should be empty as well.
roundURL := ""
if len(rids) > 0 {
roundURL = getRoundURL(rids[0])
}
sendReport := SingleUseResponseReport{
RoundsList: makeRoundsList(rids...),
RoundURL: getRoundURL(rids[0]),
RoundURL: roundURL,
ReceptionID: receptionID.Source,
EphID: receptionID.EphId.Int64(),
Payload: payload,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment