Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #255 from findy-network/fix-return-result
Browse files Browse the repository at this point in the history
fix wrong order at the loop end
  • Loading branch information
lainio authored Apr 17, 2024
2 parents 25eb421 + badf38a commit 5f5ece3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions acator/grpcenclave/rpcserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,15 @@ loop:
break loop

case status, ok := <-secEnc.OutChan:
if ok {
glog.V(3).Infoln("<== status:", status.CmdType, status.CmdID)
try.To(server.Send(status))
}

if !ok || status.GetType() == pb.CmdStatus_READY_OK {
glog.V(1).Infoln("channel closed")
break loop
}
glog.V(3).Infoln("<== status:", status.CmdType, status.CmdID)
try.To(server.Send(status))
continue loop
}
}
return nil
Expand Down

0 comments on commit 5f5ece3

Please sign in to comment.