Skip to content
Snippets Groups Projects
Commit dcde5370 authored by Benjamin Wenger's avatar Benjamin Wenger
Browse files

fixed a bug in message pickup

parent 6bde4b5d
Branches
Tags
1 merge request!53Release
......@@ -156,14 +156,13 @@ func (m *Manager) getMessagesFromGateway(roundID id.Round,
// If the gateway doesnt have the round, return an error
msgResp, err := comms.RequestMessages(host, msgReq)
if err == nil && !msgResp.GetHasRound() {
errRtn := errors.Errorf(noRoundError, roundID)
return message.Bundle{}, errors.WithMessage(errRtn, gateway.RetryableError)
if err!=nil{
return nil, err
}
if !msgResp.HasRound {
return nil, errors.Errorf("cannot pickup messages for round %d "+
"from %s, it does not have the round yet", roundID, host.GetId())
if !msgResp.GetHasRound() {
errRtn := errors.Errorf(noRoundError, roundID)
return message.Bundle{}, errors.WithMessage(errRtn, gateway.RetryableError)
}
return msgResp, err
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment