(
Map<Event<?>, Map<String, Consumer<?>>> detached, Map<String, Object> params)
| 176 | } |
| 177 | |
| 178 | private void unsubscribe( |
| 179 | Map<Event<?>, Map<String, Consumer<?>>> detached, Map<String, Object> params) { |
| 180 | try { |
| 181 | send(new Command<>("session.unsubscribe", params)); |
| 182 | } catch (RuntimeException e) { |
| 183 | // The remote end still has the subscription, so keep delivering its events and let the |
| 184 | // caller retry |
| 185 | connection.restoreListeners(detached); |
| 186 | throw e; |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | public void clearListeners() { |
| 191 | whileHoldingSubscriptionLock(() -> { |
no test coverage detected