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

disconnected event never fired #120

Open
gavalierm opened this issue Sep 26, 2021 · 0 comments
Open

disconnected event never fired #120

gavalierm opened this issue Sep 26, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@gavalierm
Copy link

gavalierm commented Sep 26, 2021

  • I'm submitting a ...
    [ x] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary

myAtem.on('disconnected', () => {
	console.log("ATEM disconnected");
	socket.emit("atem_down");    
})

EDIT:
Disconnected event is fired ONCE as very first "connection problem", when library is in "reconnecting" state (every second try to reconnect) no Disconnected event is fired.

I think it will be have "Reconnecting" event for handle this state.

My quick fix is this:

myAtem.on('info', (data) => {
	console.log(data);
	if (data === "reconnect") {
		console.log("Atem reconnecting");
		socket.emit("atem_down"); 
	}
});
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)
@Julusian Julusian added the bug Something isn't working label Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants