Skip to content

Commit

Permalink
Fix close race
Browse files Browse the repository at this point in the history
  • Loading branch information
thegridman committed Feb 3, 2025
1 parent e32ccfb commit 24a6015
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,11 @@ protected Map<Integer, SeekResult> handleSeekResponse(SeekResponse response)
@Override
public void closeSubscription(ConnectedSubscriber<V> subscriber, boolean fDestroyed)
{
f_connection.send(0, TopicServiceRequestType.DestroySubscriber, Int32Value.of(f_nProxyId));
f_connection.close();
if (f_connection.isConnected())
{
f_connection.send(0, TopicServiceRequestType.DestroySubscriber, Int32Value.of(f_nProxyId));
f_connection.close();
}
}

@Override
Expand Down

0 comments on commit 24a6015

Please sign in to comment.