List<JBCefCookie> (int timeout) { boolean result; try { result = myCountDownLatch.await(timeout, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { LOG.error("Cookie visiting is interrupted"); return Collections.emptyList(); } long timeSpent = getTime() - myStartTime; if (!result) { LOG.debug("Timeout for cookie visiting is reached, " + timeSpent + " ms time spent"); } else { LOG.debug("Cookie getting took " + timeSpent + " ms"); } return myCefCookies; }