Mercurial > hg > RemoteEditor > REPSessionManager
changeset 413:1cdbdeedc5b7
TestEditor stops syncText after QUIT.
author | one |
---|---|
date | Wed, 26 Nov 2008 11:17:29 +0900 |
parents | 2c815dd5f797 |
children | 784a4d67e6a5 |
files | test/sematest/TestEditor.java |
diffstat | 1 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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;