launchdarkly / ios-client-sdk

LaunchDarkly Client-side SDK for iOS (Swift and Obj-C)
https://docs.launchdarkly.com/sdk/client-side/ios
Other
69 stars 84 forks source link

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

Closed rdp2fm closed 3 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 Additional context Add any other context about the problem here.