You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We recently noticed when using the event listener functionality that the RemoveEventListener() does not clean up the stream if using SSE mode.
Based on the current code, it seems that this would not be an issue if you (a) reuse the marathon client or (b) use one global SSE listener for all deploys. Unfortunately we are currently recreating marathon client on every deploy, and also trying to subscribe one listener per deploy.
While we have a few options that we control (namely moving towards a global listener or reusing our marathon client), I would think that adding support to RemoveEventListener() to close the stream would be helpful. Do you agree?
If so, I can work on a PR. From a quick pass, it seems reasonable to add an SSE stream close channel to the marathon client struct and send a message down that channel to the stream listening goroutine when RemoveEventListener() is called in SSE mode.
The text was updated successfully, but these errors were encountered:
Hello,
We recently noticed when using the event listener functionality that the
RemoveEventListener()
does not clean up the stream if using SSE mode.Based on the current code, it seems that this would not be an issue if you (a) reuse the marathon client or (b) use one global SSE listener for all deploys. Unfortunately we are currently recreating marathon client on every deploy, and also trying to subscribe one listener per deploy.
While we have a few options that we control (namely moving towards a global listener or reusing our marathon client), I would think that adding support to
RemoveEventListener()
to close the stream would be helpful. Do you agree?If so, I can work on a PR. From a quick pass, it seems reasonable to add an SSE stream close channel to the marathon client struct and send a message down that channel to the stream listening goroutine when
RemoveEventListener()
is called in SSE mode.The text was updated successfully, but these errors were encountered: