Reset ConnectionListener callback object on re-init

Description

When re-initializing a connection (to give it a new Session owner), the existing ConnectionCloseListener instances need to be updated. When they were initially registered, their registration included a reference to the old session instance (to be used as a callback value). Without replacing that value, whenever the connection is closed, the reference to the old session is used (instead of the new session that replaced it). This causes problems with Stream Management (which tries to detach an old session that no longer exists).

Environment

None
Fixed

Assignee

Guus der Kinderen

Reporter

Guus der Kinderen