[Spice-devel] [PATCHv2 3/3] Do not perform network tests on UNIX socket
Marc-André Lureau
marcandre.lureau at gmail.com
Mon Jan 12 08:35:30 PST 2015
By default, stream latency is 0 and bandwidth is infinite. On UNIX
socket do not perform unnecessary testing and keep those values.
---
server/red_channel.c | 2 +-
server/reds.c | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/server/red_channel.c b/server/red_channel.c
index b06efbf..a968309 100644
--- a/server/red_channel.c
+++ b/server/red_channel.c
@@ -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) {
diff --git a/server/reds.c b/server/reds.c
index 91eb208..f145cfd 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -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) \
--
2.1.0
More information about the Spice-devel
mailing list