Skip to content

Commit

Permalink
[Java] Fix NPE in cluster client after multiple redirects. (#1179)
Browse files Browse the repository at this point in the history
  • Loading branch information
JPWatson authored May 19, 2021
1 parent 7ba9210 commit bd46ab7
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1705,19 +1705,17 @@ private void updateMembers()
{
ingressPublication = leader.publication;
leader.publication = null;
CloseHelper.closeAll(memberByIdMap.values());
memberByIdMap = parseIngressEndpoints(egressPoller.detail());
}
else
{
CloseHelper.closeAll(memberByIdMap.values());
memberByIdMap = parseIngressEndpoints(egressPoller.detail());

CloseHelper.closeAll(memberByIdMap.values());
memberByIdMap = parseIngressEndpoints(egressPoller.detail());

if (ingressPublication == null)
{
final MemberIngress member = memberByIdMap.get(leaderMemberId);
final ChannelUri channelUri = ChannelUri.parse(ctx.ingressChannel());
channelUri.put(CommonContext.ENDPOINT_PARAM_NAME, member.endpoint);
member.publication = addIngressPublication(ctx, channelUri.toString(), ctx.ingressStreamId());
ingressPublication = member.publication;
ingressPublication = addIngressPublication(ctx, channelUri.toString(), ctx.ingressStreamId());
}

step(1);
Expand Down

0 comments on commit bd46ab7

Please # to comment.