svl-rr/svl-panel-server — pull request #18 by svlPanelMaker (2013-05-13 06:30:39+00:00)
Title: Fix for Dispatch Panel Stall/Crash

Corrected an issue where double clicking a dispatch segment could cause
the dispatch panel to lock up. The problem was that the client's
dispatch state machine would be updated with the user click allowing
different sequential state updates to go to the server. Due to
inevitable network latency, this would cause the client to think
another valid state change was required when the first (and then
second) messages came back from the server. This would cause the
client to reissue the same commands, getting stuck in an infinite loop.
This fix performs screen redraws and local variable update only after
the server has responded to the generated change message. Thus while
it is possible to still send multiple messages by double clicking, they
will not be different because the local state machine has not been
updated. This fix also cleans up some other network chattiness
problems.