juliocbcotta
01/21/2017, 1:00 AMclass KweetApp : AutoCloseable ...
I understand why KweetApp is autocloseable... it wants to close the database pool when shutting down... I just don`t understand is when ktor calls close()
... the only verification of AutoCloseable is here
fun <A : Pipeline<*>, F : Any> A.uninstallFeature(key: AttributeKey<F>) {
val registry = attributes.getOrNull(ApplicationFeature.registry) ?: return
val instance = registry.getOrNull(key) ?: return
if (instance is AutoCloseable)
instance.close()
registry.remove(key)
}
As I understand... instance.close()
is a feature... does KweetApp
is seem as such?