Do not perform network tests on UNIX socket

By default, stream latency is 0 and bandwidth is infinite. On UNIX
socket do not perform unnecessary testing and keep those values.
This commit is contained in:
Marc-André Lureau 2015-01-12 17:24:44 +01:00
parent 3dcd287fcb
commit 72cc0cff71
2 changed files with 4 additions and 2 deletions

View File

@ -928,7 +928,7 @@ RedChannelClient *red_channel_client_create(int size, RedChannel *channel, RedCl
red_channel_ref(channel);
pthread_mutex_unlock(&client->lock);
if (monitor_latency) {
if (monitor_latency && reds_stream_get_family(stream) != AF_UNIX) {
rcc->latency_monitor.timer = channel->core->timer_add(
red_channel_client_ping_timer, rcc);
if (!client->during_target_migrate) {

View File

@ -1648,7 +1648,9 @@ static void reds_handle_main_link(RedLinkInfo *link)
} else {
reds_mig_target_client_add(client);
}
main_channel_client_start_net_test(mcc, !mig_target);
if (reds_stream_get_family(stream) != AF_UNIX)
main_channel_client_start_net_test(mcc, !mig_target);
}
#define RED_MOUSE_STATE_TO_LOCAL(state) \