As noted in WebSocketSessionHandler.onWebSocketClosed(), there is no
guarantee the session reports isOpen(). Performing the same check in
AbstractCommonSubscriber.removeSubscriber() (via isConnected()) can
therefore result in an ISE.
Fix this by removing the check.
JIRA: NETCONF-970
Change-Id: I6e437d9821e698e3faca121402a97b88ac486229
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
@Override
public synchronized void removeSubscriber(final StreamSessionHandler subscriber) {
- final boolean isConnected = subscriber.isConnected();
- checkState(isConnected);
- LOG.debug("Subscriber {} is removed", subscriber);
subscribers.remove(subscriber);
+ LOG.debug("Subscriber {} is removed", subscriber);
if (!hasSubscribers()) {
ListenersBroker.getInstance().removeAndCloseListener(this);
}