@Override public void onFailure(Throwable t) { if (notified.compareAndSet(false, true)) { if (timeout != null) { timeout.cancel(); } listener.onFailure(t); } }
@Override public void onResponse(final Response response) { if (notified.compareAndSet(false, true)) { if (timeout != null) { timeout.cancel(); } listener.onResponse(response); } }