void () { synchronized (myLock) { if (myStopping) return; myStopping = true; } LOG.debug("closing connection"); synchronized (myLock) { for (Thread thread : myThreadsToInterrupt) { thread.interrupt(); } } onClosing(); myResponseProcessor.stopReading(); Disposer.dispose(this); }