I'm creating a terminal app and noticed that if we create more than 10 instances of terminal, it is throwing below error. All session are not active at the same time. I have destroyed document and terminal object on close of each session using below code.
Each time when we create a new terminal, we are subscribing to process exit event but can't find an option to unsubscribe or verify before subscribing to same event again and again.
I'm creating a terminal app and noticed that if we create more than 10 instances of terminal, it is throwing below error. All session are not active at the same time. I have destroyed document and terminal object on close of each session using below code.![image](https://github.com/cronvel/terminal-kit/assets/32077544/5c35554a-1dc8-4a66-a637-5b7526da8c7b)
Each time when we create a new terminal, we are subscribing to process exit event but can't find an option to unsubscribe or verify before subscribing to same event again and again.
terminal-kit\lib\Terminal.js:![image](https://github.com/cronvel/terminal-kit/assets/32077544/1d224986-6817-434d-97c9-763a7bc177ee)
please guide me if I am missing anything here.
do we have to set MaxListeners to Infinity?