From 234b20ee3be49528862ca6979e1ae7517ae5fed8 Mon Sep 17 00:00:00 2001 From: James Turner Date: Mon, 19 Nov 2012 23:05:11 +0000 Subject: [PATCH] Avoid spurious listener fires. When retrieving the dynamic server list, avoid spurious fires and noisy output. --- gui/dialogs/multiplayer.xml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/gui/dialogs/multiplayer.xml b/gui/dialogs/multiplayer.xml index 933a69fa6..301bdb2fe 100644 --- a/gui/dialogs/multiplayer.xml +++ b/gui/dialogs/multiplayer.xml @@ -24,10 +24,7 @@ var servers = props.globals.getNode("/sim/gui/dialogs/multiplay/servers", 1); var updateServers = func { - servers.removeChildren("value"); - - debug.dump("Got server list"); - + servers.removeChildren("value"); # get the results list from the server var serverlist = props.globals.getNode("/sim/multiplay/server-list", 1); @@ -54,8 +51,8 @@ } # listen for results arriving - setlistener("/sim/multiplay/got-servers", updateServers, 1); - setlistener("/sim/multiplay/get-servers-failure", updateServersFailed, 1); + setlistener("/sim/multiplay/got-servers", updateServers); + setlistener("/sim/multiplay/get-servers-failure", updateServersFailed); fgcommand("xmlhttprequest", props.Node.new({ "url" : "http://liveries.flightgear.org/mpstatus/mpservers.xml",