why does router.close() trigger producer.on(‘transportclose’) while I neither subscribed to transport.on(‘routerclose’) nor called the transport.close() method?
Exactly as documented.
router.close() → transport.RouterClosed(), Emit(“routerclose”) → producer.TransportClosed(), Emit(“transportclose”) .
OK I get it now
I could not understand by reading the documentation on GC that the process of closing the mediasoup objects is handled by meidasoup itself if the top level object is closed, and it’s not on me as the node developer to subscribe to *close events and call the *.close() methods