/** * Closes the HMS client. * * <p>This is similar to disconnect. As this class implements AutoClosable, close should be * implemented. */ public void close() { disconnect(); }
@Override public void close() { if (client != null) { // Close any outstanding connections to HMS try { client.disconnect(); SentryStateBank.disableState(HMSFollowerState.COMPONENT,HMSFollowerState.CONNECTED); } catch (Exception failure) { LOGGER.error("Failed to close the Sentry Hms Client", failure); } } notificationFetcher.close(); }