Make sure that:
- when registering HT handler you call on it connect, so it will register listeners to receive events from TaskService
- when disposing ksession call dispose on the HT handler to de-register listeners from TaskService
whenever you consider to reload the ksession make sure you dispose the previously active one to avoid duplicated ksession (with same id) being active at the same time.
HTH