diff --git a/cmd/soroban-rpc/internal/events/events.go b/cmd/soroban-rpc/internal/events/events.go index 12e8e765..fcea2a2b 100644 --- a/cmd/soroban-rpc/internal/events/events.go +++ b/cmd/soroban-rpc/internal/events/events.go @@ -207,6 +207,7 @@ func (m *MemoryStore) IngestEvents(ledgerCloseMeta xdr.LedgerCloseMeta) error { } m.lock.Lock() if _, err = m.eventsByLedger.Append(bucket); err != nil { + m.lock.Unlock() return err } m.lock.Unlock()