Skip to content

Commit

Permalink
[Java] Fix NPE in cluster client after multiple redirects. (aeron-io#…
Browse files Browse the repository at this point in the history
  • Loading branch information
JPWatson authored and mikeb01 committed May 20, 2021
1 parent ebf833a commit bd71ae8
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 bd71ae8

Please # to comment.