Skip to content
  • Mihai Moldovan's avatar
    src/x2goclient-network-ssh.c: move check timeout to a separate thread, add... · 54e91eed
    Mihai Moldovan authored
    src/x2goclient-network-ssh.c: move check timeout to a separate thread, add synchronization via a mutex.
    
    We cannot execute a timeout in the main (or, for that matter, callingg) thread, since that would require a running main loop. However, libx2goclient is supposed to be used by other applications and we cannot usefully force them into starting a glib main loop. Additionally, that would make executing any other code almost impossible, so that won't fly either way.
    
    Instead, spawn a different thread for this timer (timeout in glib-parlance) and synchronize access to instance variables (and, by extension, the newly added ones for the thread and the like).
    
    Also, make sure that the last check can run out correctly at object finalization time.
    54e91eed