Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sendKeyPromise() causes application to never exit #277

Open
matt328 opened this issue Jun 13, 2022 · 2 comments
Open

sendKeyPromise() causes application to never exit #277

matt328 opened this issue Jun 13, 2022 · 2 comments

Comments

@matt328
Copy link

matt328 commented Jun 13, 2022

Possibly I don't have my application configured correctly, but if I call control.sendKeyPromise(), the application never exits. Not sure if it keeps a websocket alive and node is detecting this or what, but the promise resolves and execution passes through the entirety of index.ts, just the process never exits.

Edit:

https://github.com/matt328/game-time/blob/main/src/index.ts#L28 is my repro.

@hurrikam
Copy link

hurrikam commented Jul 27, 2022

I came to see if this issue was already reported. I'm using the latest version 1.12.4 and I think the conditional logic in the internal _sendKey() function isn't closing the WebSocket connection in every case it should.
By the way it happens with the callback based version as well, sendKey().

I tried calling the closeConnection method in the callback or after the promise is resolved but as far I can see, the method is empty and it does nothing.

@eisenwinter
Copy link

yeah its an open handle issue,
it keeps the connection open for some reason

and also Ive been wondering why I couldnt close it till i peeked at https://github.com/Toxblh/samsung-tv-control/blob/master/src/samsung.ts#L348

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants