Commit 7e61eea5 authored by Mihai Moldovan's avatar Mihai Moldovan
Browse files

src/x2goclient-network-ssh.c: change timeout check to 3000 ms (3 seconds) while debugging.

Also, add notes to revert that after debugging and to make it non-static
at some later time (to account for things like round-trip times if the
control socket is non-local).
parent 115cda27
......@@ -1516,7 +1516,22 @@ static gboolean x2goclient_network_ssh_start_check_timeout_real (X2GoClientNetwo
g_mutex_lock (&(self->check_thread_mutex));
/* Add source. */
self->check_timeout_source = g_timeout_source_new (50);
/* FIXME: revert back to 50 ms after debugging. */
/* FIXME: is a static value the right way to go here?
* Checking if the master connection is still alive every 50 ms is
* fine IFF the connection is local (i.e., a local UNIX socket).
* However, since we want to eventually forward UNIX sockets (one of
* the reasons for using OpenSSH instead of other libraries), a UNIX
* socket might not be local and it's not entirely unthinkable that
* we'll eventually forward even control UNIX sockets.
* In such a case, even though communication with the socket looks
* transparent to everything else, it will still incur round-trip
* times that might exceed our default value of 50 ms, which isn't a
* big problem per se, but wasting CPU and network resources.
* We'd be fine running the check every 5 round trips, so a static
* value is not that great, really.
self->check_timeout_source = g_timeout_source_new (3000);
/* Bind check function to timeout source. */
g_source_set_callback (self->check_timeout_source, &x2goclient_network_ssh_check_timeout, self, NULL);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment