Skip to content

Fix crash on teardown

David Edmundson requested to merge work/d_ed/fix_crash_after_free into master

The class Server owns connection objects. It tracks for stateChanged and cleans up when the connection state changes. SessionController also tracks sessions and maintains an internal list of wrappers that needs to be kept up to date with active connections.

Both listening to stateChanged leads to use after free when we check the state.

Semantically only the owner should be looking for the state change, the SessionWrapper doesn't care why we are deleting.

Merge request reports