khatru: handle request synchronously until EOSE, no need for waitgroups.

This commit is contained in:
fiatjaf
2026-05-19 20:46:14 -03:00
parent b70dd86e7c
commit e11e32e3e2
2 changed files with 3 additions and 13 deletions
+1 -4
View File
@@ -3,15 +3,12 @@ package khatru
import (
"context"
"errors"
"sync"
"fiatjaf.com/nostr"
"fiatjaf.com/nostr/nip45/hyperloglog"
)
func (rl *Relay) handleRequest(ctx context.Context, id string, eose *sync.WaitGroup, ws *WebSocket, filter nostr.Filter) error {
defer eose.Done()
func (rl *Relay) handleRequest(ctx context.Context, id string, ws *WebSocket, filter nostr.Filter) error {
// then check if we'll reject this filter (we apply this after overwriting
// because we may, for example, remove some things from the incoming filters
// that we know we don't support, and then if the end result is an empty