Closes subscription when finished by timeout.

This commit is contained in:
Vitor Pamplona
2025-08-11 10:33:21 -04:00
parent 549074ef13
commit d5b9d5e80b

View File

@@ -49,7 +49,6 @@ fun NostrClient.downloadFirstEvent(
if (subId == subscriptionId) {
unsubscribe(this)
close(subscriptionId)
onResponse(event)
}
}
@@ -61,6 +60,8 @@ fun NostrClient.downloadFirstEvent(
GlobalScope.launch(Dispatchers.IO) {
delay(30000)
close(subscriptionId)
unsubscribe(listener)
}
}