in core/src/main/java/com/google/cloud/sql/core/MonitoredCache.java [130:151]
public synchronized void close() {
if (cache.isClosed()) {
return;
}
cache.close();
if (task != null) {
task.cancel();
}
// If this was opened using a domain name, close remaining open sockets.
synchronized (sockets) {
for (Socket socket : sockets) {
if (!socket.isClosed()) {
try {
socket.close();
} catch (IOException e) {
logger.debug("Exception closing socket after cache closed", e);
}
}
}
}
}