/**
- * 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
import net.pterodactylus.sone.freenet.plugin.*
import net.pterodactylus.sone.utils.*
import java.util.concurrent.atomic.*
+import java.util.function.*
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>) : Runnable {
private val lastState = AtomicBoolean(false)
lastState.set(false)
}
}
- reschedule()
+ reschedule(this)
}
}