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 Disconnect doesnt close the connection #151

Open
rdp2fm opened this issue May 22, 2021 · 3 comments
Open

Calling Disconnect doesnt close the connection #151

rdp2fm opened this issue May 22, 2021 · 3 comments

Comments

@rdp2fm
Copy link

rdp2fm commented May 22, 2021

No description provided.

@hechukwu
Copy link

hechukwu commented Nov 3, 2021

No response?

@tiwari1amrit
Copy link

Is anyone solved this issue?

@ahtcx
Copy link

ahtcx commented Dec 3, 2023

I had this issue intially, where disconnect wasn't actually ever disconnecting. After some debugging I realised that it was actually because my faulty code was creating a new instance of EventSource on every message received. The newly created instances weren't ever properly connected, which mean their urlSession variable was always nil and therefore the disconnect urlSession?.invalidateAndCancel() was never called. Fixing my code to ensure only one instance of EventSource was created solved my issue.

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

4 participants