openspotify
openspotify copied to clipboard
Disconnection or logout can leave pending requests and channels
When we're disconnected (because of errors or because of logout) there might be several requests that are in a pending state.
- Login might be processed
- Playlists might be retrieved
- Tracks/artists/albums metadata might be retrieved
These requests should either be aborted (if in REQ_STATE_RUNNING) or postponed (in REQ_STATE_NEW).
Otherwise corruption or NULL pointer dereferences might occur due to sp_session::login or sp_session::playlist_ctx being stale