in client/src/main/java/co/elastic/opamp/client/internal/OpampClientImpl.java [119:135]
public void stop() {
runningLock.lock();
try {
if (!isRunning) {
throw new IllegalStateException("The client has not been started");
}
if (!isStopped) {
isStopped = true;
prepareDisconnectRequest();
requestService.stop();
} else {
throw new IllegalStateException("The client has already been stopped");
}
} finally {
runningLock.unlock();
}
}