65ef66e Spice: listen for new 'SpiceSession::disconnected' signal

Authored and Committed by jjongsma 5 years ago
    Spice: listen for new 'SpiceSession::disconnected' signal
    
    Previously we were emitting the VirtViewerSession::session-disconnected
    when we got the Spice::session::channel-destroy signal for the last
    channel. However, since the channels are still valid at this point, and
    because VirtViewerApp quits the application in response to the
    session-disconnected signal, that means that the channels were never
    being properly freed. This was particularly problematic for the usbredir
    channel, which must disconnect any connected USB devices as part of its
    destruction. By using the new SpiceSession::disconnected signal instead,
    we can ensure that all channels have been disconnected and properly
    destroyed before quitting the application.