diff --git a/core/src/main/groovy/com/muwire/core/hostcache/CacheClient.groovy b/core/src/main/groovy/com/muwire/core/hostcache/CacheClient.groovy index 673232dc..64056486 100644 --- a/core/src/main/groovy/com/muwire/core/hostcache/CacheClient.groovy +++ b/core/src/main/groovy/com/muwire/core/hostcache/CacheClient.groovy @@ -71,7 +71,12 @@ class CacheClient { options.setSendLeaseSet(true) CacheServers.getCacheServers().each { log.info "Querying hostcache ${it.toBase32()}" - session.sendMessage(it, ping, 0, ping.length, I2PSession.PROTO_DATAGRAM, 1, 0, options) + try { + session.sendMessage(it, ping, 0, ping.length, I2PSession.PROTO_DATAGRAM, 1, 0, options) + } catch (Exception e) { + if (!stopped.get()) + throw e + } } }