Clears filters when DataSource closes

This commit is contained in:
Vitor Pamplona 2023-02-12 21:44:18 -05:00
parent 04d94b4dbf
commit b2da651fd1

View File

@ -125,8 +125,10 @@ abstract class NostrDataSource<T>(val debugName: String) {
open fun stop() {
subscriptions.values.forEach { channel ->
if (channel.typedFilters != null) // if it is active, close
if (channel.typedFilters != null) {// if it is active, close
Client.close(channel.id)
channel.typedFilters = null
}
}
}