mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-20 19:30:46 +02:00
Forces relay status updates when connecting and disconnecting
This commit is contained in:
@@ -94,24 +94,31 @@ class RelayPool(
|
||||
relay.connectAndSyncFiltersIfDisconnected()
|
||||
}
|
||||
}
|
||||
updateStatus()
|
||||
}
|
||||
|
||||
fun connect() =
|
||||
fun connect() {
|
||||
relays.forEach { url, relay ->
|
||||
relay.connect()
|
||||
}
|
||||
updateStatus()
|
||||
}
|
||||
|
||||
fun connectIfDisconnected() =
|
||||
fun connectIfDisconnected() {
|
||||
relays.forEach { url, relay ->
|
||||
relay.connectAndSyncFiltersIfDisconnected()
|
||||
}
|
||||
updateStatus()
|
||||
}
|
||||
|
||||
fun connectIfDisconnected(relay: NormalizedRelayUrl) = relays.get(relay)?.connectAndSyncFiltersIfDisconnected()
|
||||
|
||||
fun disconnect() =
|
||||
fun disconnect() {
|
||||
relays.forEach { url, relay ->
|
||||
relay.disconnect()
|
||||
}
|
||||
updateStatus()
|
||||
}
|
||||
|
||||
fun sendRequest(
|
||||
relay: NormalizedRelayUrl,
|
||||
|
Reference in New Issue
Block a user