Avoids sending filters on new connections if the client is not active
This commit is contained in:
@@ -115,9 +115,11 @@ class NostrClient(
|
|||||||
stats = RelayStats.get(relay),
|
stats = RelayStats.get(relay),
|
||||||
scope = scope,
|
scope = scope,
|
||||||
) { liveRelay ->
|
) { liveRelay ->
|
||||||
activeRequests.forEachSub(relay, liveRelay::sendRequest)
|
if (isActive) {
|
||||||
activeCounts.forEachSub(relay, liveRelay::sendCount)
|
activeRequests.forEachSub(relay, liveRelay::sendRequest)
|
||||||
eventOutbox.forEachUnsentEvent(relay, liveRelay::send)
|
activeCounts.forEachSub(relay, liveRelay::sendCount)
|
||||||
|
eventOutbox.forEachUnsentEvent(relay, liveRelay::send)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun allAvailableRelays() = relayPool.getAll()
|
fun allAvailableRelays() = relayPool.getAll()
|
||||||
|
|||||||
Reference in New Issue
Block a user