janispritzkau / rcon-client

A simple and modern RCON client made to work with Minecraft
64 stars 17 forks source link

[PR] fixed resolve on end #7

Closed axi92 closed 1 year ago

axi92 commented 4 years ago

If had the issue that the rcon.end() does not resolve.

Please look over my PR and maybe merge the fix. I tried it on Ark Survival Evolved. Can somebody try this fix on Minecraft maybe too?

Hornwitser commented 4 years ago

This makes no sense. The socket is responsible for emitting the close event, the code should not be emitting it at all. If the event isn't received that means the socket hasn't fully closed yet and you need to find out why that is the case, it might be that Ark Survival Evolved is improperly closing the TCP connection.

axi92 commented 4 years ago

Hmm it looks like that. The end event is never called without those changes that I made. I can connect, auth, execute the command but end() is never resolved...

@Hornwitser do you have Discord so maybe I can provide you an Ark server to test this on? That is my code I am using: https://github.com/axi92/sunny-cron/blob/master/app/index.js