X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ffreenet%2Fwot%2FIdentityManagerImpl.kt;h=67e70e08814570b0d1b900db45908ed40dc6c55b;hb=bf9d78ae8c577a31e6477afc4cfebcf024df3596;hp=b7a48dd1ac18223b5e177b8f7a1eea2728b23b11;hpb=16a3fa75fb747e734a819113431dfb3eff1fa9bf;p=Sone.git diff --git a/src/main/kotlin/net/pterodactylus/sone/freenet/wot/IdentityManagerImpl.kt b/src/main/kotlin/net/pterodactylus/sone/freenet/wot/IdentityManagerImpl.kt index b7a48dd..67e70e0 100644 --- a/src/main/kotlin/net/pterodactylus/sone/freenet/wot/IdentityManagerImpl.kt +++ b/src/main/kotlin/net/pterodactylus/sone/freenet/wot/IdentityManagerImpl.kt @@ -1,5 +1,5 @@ /* - * Sone - IdentityManagerImpl.java - Copyright © 2010–2019 David Roden + * Sone - IdentityManagerImpl.kt - Copyright © 2010–2020 David Roden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,6 +20,7 @@ package net.pterodactylus.sone.freenet.wot import com.google.common.eventbus.* import com.google.inject.* import net.pterodactylus.util.service.* +import java.util.concurrent.TimeUnit.* import java.util.logging.* import java.util.logging.Logger.* @@ -68,10 +69,12 @@ class IdentityManagerImpl @Inject constructor( } } catch (wote1: WebOfTrustException) { logger.log(Level.WARNING, "WoT has disappeared!", wote1) + } catch (e: Exception) { + logger.log(Level.SEVERE, "Uncaught exception in IdentityManager thread!", e) } /* wait a minute before checking again. */ - sleep((60 * 1000).toLong()) + sleep(SECONDS.toMillis(60)) } }