Closed Thomas-Smyth closed 4 years ago
Seeing the same issue. Are you still maintaining this?
@Taraman17 based on the lack of response to this issue I assume not.
Please refer to my fork for a possible fix... https://github.com/Thomas-Smyth/rcon/commit/8de4d8e83e657924e61ff8ce1bd0b95299d7d2b3
Thanks to @Taraman17's work this issue has been finally fixed. Listeners are now being removed correctly 🎉
Hello,
I've been using a fork of this repository, however, this issue seems to be inherited from here.
I am using the repository to poll a server once every so often to get player count details. After around 9
.execute()
calls, the following warning is thrown:It looks as if your code is not removing listeners after the returning the response. To test this I editted your
write
function to remove the.on('data', onData)
just before the promise is resolved. This seems to have prevented the warning, however, I am not sure on what effect it will have on multi-packet responses. Is this something that you could look into?Thanks in advance.