[bug]After the system has been running for a while, the value of aedes.connectedClients will continue to increase.
System Information
- Aedes: 0.51.3
- NodeJS: 18.20.4
- OS: Debian 6.1.76
- Arch: x86_64
Describe the bug
I mentioned this issue before at https://github.com/moscajs/aedes/issues/985. After updating to the latest version, this problem still exists. It has been observed that when aedes.connectedClients has a problem, the value obtained by Object.keys(aedes.clients).length is normal, which means that there is a problem with aedes.connectedClients. Generally, the system starts to have problems after running for 10 to 15 days, and once aedes.connectedClients has a problem, it will increase faster, with an average increase of 1 per day.
There is a situation that needs to be explained. My client is in a mobile environment, and some clients may disconnect and reconnect frequently.
Would you like to submit a PR to fix this issue?
Oh, sorry, I found this problem, but I don't know why.