Hubmakerlabs / replicatr

Nostr relay with Internet Computer integration for inter-relay synchronization
https://mleku.dev/git/replicatr
GNU General Public License v2.0
13 stars 1 forks source link

fix bug in handling replaceable events #10

Closed mleku closed 6 months ago

mleku commented 6 months ago

there is a bug in the eventstore query function that seems to stall the websocket and cause the client sending events to time out the socket context (7 seconds)

mleku commented 6 months ago

this turned out to be because of a data race on badger transaction handles and once that was fixed a nil panic caused by a channel close emitting a nil event to the results channel of QueryEvents

fixed and submitted a PR upstream to resolve the problem also for other users of fiatjaf/eventstore