launchdarkly / cpp-sdks

C++ Client/Server SDKs
Other
5 stars 2 forks source link

fix: do not block identify on SSE client shutdown completion #384

Closed cwaldren-ld closed 4 months ago

cwaldren-ld commented 4 months ago

It appears that the async_shutdown method in Foxy client hangs indefinitely. It's not clear to me whether this is because the FD servers are misbehaving, or the client is somehow misbehaving.

In any case, this is causing Identify to hang because it waits for async_shutdown completion handler to be invoked before creating a new EventSource client.

One solution would be to not wait for that, and just make the new client immediately. That works, but it still leaves the old client sitting in memory waiting forever.

Instead, I've changed the shutdown logic to simply close the TCP socket.