Background
https://github.com/Microsoft/BotFramework-WebChat/blob/master/packages/core/src/sagas/effects/observeOnce.js#L11
In this line of code, we didn't assign the result of observable.subscribe() to subscription. Thus, subscription is always empty and thus, we never call unsubscribe().
Things to-do
- Modify https://github.com/Microsoft/BotFramework-WebChat/blob/master/packages/core/src/sagas/effects/observeOnce.js#L11
- Assign the result of
observable.subscribe() to subscription variable
- Verify
unsubscribe() is being called correctly
- Verify all callers of
observeOnce will continues to work
Background
https://github.com/Microsoft/BotFramework-WebChat/blob/master/packages/core/src/sagas/effects/observeOnce.js#L11
In this line of code, we didn't assign the result of
observable.subscribe()tosubscription. Thus,subscriptionis always empty and thus, we never callunsubscribe().Things to-do
observable.subscribe()tosubscriptionvariableunsubscribe()is being called correctlyobserveOncewill continues to work