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

Calling close in onDisconnect callback doesn't stop it from reconnecting #3

Closed
uyha opened this issue Aug 2, 2024 · 1 comment
Closed

Comments

@uyha
Copy link

uyha commented Aug 2, 2024

I have a small snippet like the following

let es = createEventSource({
		url: `someurl`,
		onDisconnect: () => {
			console.log('here');
			es.close();
		}
	});

On the console, "here" is still being printed out continuously.

@rexxars rexxars closed this as completed in efed962 Aug 5, 2024
@rexxars
Copy link
Owner

rexxars commented Aug 5, 2024

Good find! Fixed in v1.1.2 - thanks!

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

2 participants