src/x2goclient-network-ssh.c: move check timeout to a separate thread, add...
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.
Showing with 153 additions and 16 deletions