mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-25 20:47:49 +02:00
Closes subscription when finished by timeout.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user