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

Platform should emit a close on socket close? #95

Open
i8beef opened this issue Jul 8, 2020 · 1 comment
Open

Platform should emit a close on socket close? #95

i8beef opened this issue Jul 8, 2020 · 1 comment

Comments

@i8beef
Copy link

i8beef commented Jul 8, 2020

I'm trying to implement something a bit more long lived than the examples, and I think I hit a snag. The heartbeat maintains an active connection, and on a timeout looks like it would emit an error event from the Platform to indicate said timeout.

However on a forceful close of the socket, say me walking over an unplugging the Google Home to simulate, the socket close looks like it is wrapped ok by castv2's client and emitted as a "close" event that the Platform grabs and does some internal cleanup... but then it fails to emit a "close" event from the Platform, meaning as a caller, I don't seem to have a way to be notified of this event?

Let me know if I'm missing something here for why that doesn't emit, and if there's a different way to identify this state.

@i8beef i8beef changed the title Client should emit a close on socket close? Platform should emit a close on socket close? Jul 8, 2020
@i8beef
Copy link
Author

i8beef commented Jul 8, 2020

Played around a bit and realized I could register my own handlers to Platform.client instead... is that the expected path here, or does my assertion that an explicit close from Platform stand?

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

1 participant