Skip to content

Commit

Permalink
fix member race problem
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Leung <rleungx@gmail.com>
  • Loading branch information
rleungx committed Mar 2, 2023
1 parent c82b237 commit dc02825
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/grpc_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,12 @@ func (s *GrpcServer) GetMembers(context.Context, *pdpb.GetMembersRequest) (*pdpb
members, err := s.Server.GetMembers()
if err != nil {
return &pdpb.GetMembersResponse{
Header: s.wrapErrorToHeader(pdpb.ErrorType_UNKNOWN, err.Error()),
Header: &pdpb.ResponseHeader{
Error: &pdpb.Error{
Type: pdpb.ErrorType_UNKNOWN,
Message: err.Error(),
},
},
}, nil
}

Expand Down

0 comments on commit dc02825

Please sign in to comment.