X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ffreenet%2Fwot%2FWebOfTrustPinger.kt;h=db9809efd387703620ec6d83dca15eb43ee83638;hb=faf66247a34f64946990a985d2ea3003465969cb;hp=9d0522d36ba085c30e797fa4849076c4e4bb8500;hpb=b385551aaa0750cb0041858037cd83dcbf9006b6;p=Sone.git diff --git a/src/main/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustPinger.kt b/src/main/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustPinger.kt index 9d0522d..db9809e 100644 --- a/src/main/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustPinger.kt +++ b/src/main/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustPinger.kt @@ -1,5 +1,5 @@ /** - * Sone - WebOfTrustPinger.kt - Copyright © 2019 David ‘Bombe’ Roden + * Sone - WebOfTrustPinger.kt - Copyright © 2019–2020 David ‘Bombe’ 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 @@ -22,6 +22,7 @@ import net.pterodactylus.sone.core.event.* import net.pterodactylus.sone.freenet.plugin.* import net.pterodactylus.sone.utils.* import java.util.concurrent.atomic.* +import java.util.function.* import javax.inject.* /** @@ -32,7 +33,7 @@ import javax.inject.* class WebOfTrustPinger @Inject constructor( private val eventBus: EventBus, @Named("webOfTrustReacher") private val webOfTrustReacher: Runnable, - @Named("webOfTrustReschedule") private val reschedule: Runnable) : Runnable { + @Named("webOfTrustReschedule") private val reschedule: Consumer) : Runnable { private val lastState = AtomicBoolean(false) @@ -49,7 +50,7 @@ class WebOfTrustPinger @Inject constructor( lastState.set(false) } } - reschedule() + reschedule(this) } }