changeset 451:fa7d9ec2008e

too much blocking
author one
date Thu, 23 Sep 2010 19:51:19 +0900
parents 21cb16b7f3df
children d0d2449000f5
files rep/handler/Editor.java
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rep/handler/Editor.java	Thu Sep 23 18:15:37 2010 +0900
+++ b/rep/handler/Editor.java	Thu Sep 23 19:51:19 2010 +0900
@@ -246,6 +246,7 @@
 	}
 
 	private void startMerge(REPCommand command) {
+		ServerMainLoop.logger.writeLog("Editor"+eid+": startMerge "+command);
 		preMergeCommand = new REPCommand(command);
 		// merge は必須だが、EditorのCommand実装をテストするには邪魔なので、off に出来るようにする。
 		if (noMergeMode) {
@@ -408,7 +409,11 @@
 	 */
 	@Override
 	public void write(REPCommand command) {
-		if (	!waitingRequired(command,channel)) {
+		if (merging) {
+				addWaitingCommand(new PacketSet(this, new REPCommand(command)));
+				return;
+		}
+		if (!waitingRequired(command,channel)) {
 			if (isMergeCommand(command)) {
 				merging = true;
 			}