Mercurial > hg > RemoteEditor > REPSessionManager
diff rep/Editor.java @ 341:a9a740e685fa
remove session using QUIT_2_ACK
author | kono |
---|---|
date | Mon, 13 Oct 2008 03:05:53 +0900 |
parents | 5ba5b7a9761b |
children | ef4afcae0c92 |
line wrap: on
line diff
--- a/rep/Editor.java Sun Oct 12 20:03:47 2008 +0900 +++ b/rep/Editor.java Mon Oct 13 03:05:53 2008 +0900 @@ -166,11 +166,19 @@ case SMCMD_QUIT_2: { // QUIT_2 is returned. - //manager.remove(this); - Forwarder editor1 = getNextForwarder(); - // don't send quit2 to the editor until all pending + if (receivedCommand.eid!=eid) { + // stop this editor unless this is the start, starter will stopped + // by QUIT_2_ACK + manager.remove(this); + } + // don't send quit_2 directly to the editor until all pending // merge is processed. - editor1.setQuit2(receivedCommand); + next.setQuit2(receivedCommand); + break; + } + case SMCMD_QUIT_2_ACK: + { + manager.remove(this); break; } default: