Description
I think this might be a memory leak.
At controller/internal/service/controller_service.go:442, Listen() creates an entry in the listenQueues sync.Map via LoadOrStore. When the listener disconnects (ctx.Done at line 445 or stream.Send failure at line 449), the function returns without removing the entry.
There is no listenQueues.Delete() call anywhere in the codebase, so channels accumulate in the map over time as leases are created and disconnected.
Suggested Fix
- Add
defer s.listenQueues.Delete(leaseName) after the LoadOrStore call