# HG changeset patch # User one # Date 1227665849 -32400 # Node ID 1cdbdeedc5b7e0f93285d5ed97aa2d5c01936762 # Parent 2c815dd5f797be45e6633aae9dc3343045a95611 TestEditor stops syncText after QUIT. diff -r 2c815dd5f797 -r 1cdbdeedc5b7 test/sematest/TestEditor.java --- a/test/sematest/TestEditor.java Wed Nov 26 09:51:23 2008 +0900 +++ b/test/sematest/TestEditor.java Wed Nov 26 11:17:29 2008 +0900 @@ -186,6 +186,7 @@ * clients simply disconnect from the session manager. */ cmds.clear(); + cmd.eid = -1; quit = cmd; break; case SMCMD_JOIN: @@ -204,7 +205,10 @@ // no more command to send, and we don't have syncCounter timeout = 0; if (quit!=null) { - sendCommand(quit); + if (quit.eid==-1) + sendCommand(quit); + else + forwardCommand(quit); quit=null; } } @@ -271,10 +275,11 @@ break; case SMCMD_QUIT : if (cmd.eid!=eid) - forwardCommand(cmd); - else - sendCommand(new REPCommand(REP.SMCMD_QUIT_2, - sid, eid, seq, 0, "")); + quit = cmd; + else // eid=-1 means do not forward but send it. + quit = new REPCommand(REP.SMCMD_QUIT_2, + sid, -1, seq, 0, ""); + timeout=1; // stop input processing after this command cmds.clear(); break;