mercurius-js / mercurius

Implement GraphQL servers and gateways with Fastify
https://mercurius.dev/
MIT License
2.33k stars 234 forks source link

Remove all listeners on close #1031

Closed aldotms70 closed 9 months ago

aldotms70 commented 10 months ago

This patch calls the removeListener on emitter for all subscribed topics. It is important to avoid memory leak. When using MQEmitterRedis is most important to unsubscribe pattern on redis server.