internal void ReleasePublication(ExclusivePublication publication) { VerifyActive(); ExclusivePublication publicationToRemove; _activeExclusivePublications.TryRemove(publication.RegistrationId, out publicationToRemove); if (publication == publicationToRemove) { LingerResource(publication.ManagedResource()); AwaitResponse(_driverProxy.RemovePublication(publication.RegistrationId), null); } }
internal void ReleasePublication(ExclusivePublication publication) { if (_isClosed) { throw new InvalidOperationException("Aeron client is closed"); } ExclusivePublication publicationToRemove; _activeExclusivePublications.TryRemove(publication.RegistrationId, out publicationToRemove); if (publication == publicationToRemove) { LingerResource(publication.ManagedResource()); AwaitResponse(_driverProxy.RemovePublication(publication.RegistrationId), null); } }