launchdarkly / swift-eventsource

Server-sent events (SSE) client implementation in Swift for iOS, macOS, tvOS, and watchOS
https://launchdarkly.github.io/swift-eventsource/
Other
196 stars 36 forks source link

Calling .stop() does not end the request. The request is still open against the server. #20

Closed rdp2fm closed 2 years ago

rdp2fm commented 3 years ago

Is this a support request? Yes

Describe the bug calling .stop() does not kill the request. If I call .stop() on an event source, I would expect the http request to close. My use case is creating an SSE connection and then close it and create a new one in specific scenarios. This is not working (maybe by design?). To reproduce Steps to reproduce the behavior. Create many requests but check if an eventsource already exists and call .stop() on it and create a new one. Expected behavior A clear and concise description of what you expected to happen. The "old" event source http requests to send a connection: close to the server and close.

Logs If applicable, add any log output related to your problem.

SDK version The version of this SDK that you are using. LDSwiftEventSource (1.2.1) Language version, developer tools For instance, Go 1.11 or Ruby 2.5.3. If you are using a language that requires a separate compiler, such as C, please include the name and version of the compiler too. Swift5 OS/platform For instance, Ubuntu 16.04, Windows 10, or Android 4.0.3. If your code is running in a browser, please also include the browser type and version. iOS14.5

torchhound commented 3 years ago

Hi @rdp2fm thanks for reporting this.

Filed internally as 104803

rdp2fm commented 3 years ago

@torchhound do you have any updates?

gwhelanLD commented 2 years ago

Hi @rdp2fm,

I believe this should be resolved with https://github.com/launchdarkly/swift-eventsource/releases/tag/1.3.0. I'm closing this issue, but feel free to reopen if you continue to see this issue with that release.

Thanks, @gwhelanLD