Mercurial > hg > RemoteEditor > REPSessionManager
comparison rep/handler/Editor.java @ 466:b13926e43c28
minor fix
author | one |
---|---|
date | Sat, 02 Oct 2010 08:44:33 +0900 |
parents | c83af820eb62 |
children | b800b33c6988 |
comparison
equal
deleted
inserted
replaced
465:c83af820eb62 | 466:b13926e43c28 |
---|---|
286 * 無視して良い。 | 286 * 無視して良い。 |
287 * @param command | 287 * @param command |
288 * @return | 288 * @return |
289 */ | 289 */ |
290 private boolean checkAck(REPCommand command) { | 290 private boolean checkAck(REPCommand command) { |
291 assert(!isMerging()); | 291 REPCommand prev = null; |
292 REPCommand prev; | 292 try { |
293 prev=ackList.remove(0); | 293 if(isMerging() || ackList.size()==0) throw new Exception(); |
294 if (prev==null || prev.seq != command.seq || prev.eid!=command.eid) { | 294 prev=ackList.remove(0); |
295 if (prev==null || prev.seq != command.seq || prev.eid!=command.eid) throw new Exception(); | |
296 } catch (Exception n) { | |
295 // should be more robust to allow communication failure | 297 // should be more robust to allow communication failure |
296 String err = "Editor eid="+eid+" checkReturnedCommand() : command = " + command + " prev="+ | 298 String err = "Editor eid="+eid+" checkReturnedCommand() : command = " + command + " prev="+ |
297 (prev==null?"null":prev)+" ackList="; | 299 (prev==null?"null":prev)+" ackList="; |
298 err += ackList; | 300 err += ackList; |
299 ServerMainLoop.logger.writeLog(err); | 301 ServerMainLoop.logger.writeLog(err); |
300 assert(false); | 302 assert(false); |
301 } | 303 } |
302 return true; | 304 return true; |