changeset 287:1ff8bfc0a99a test-editor

*** empty log message ***
author kono
date Sun, 28 Sep 2008 15:46:36 +0900
parents 30c993e89286
children d93b062eadaa
files rep/SessionManager.java
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/rep/SessionManager.java	Sun Sep 28 15:41:42 2008 +0900
+++ b/rep/SessionManager.java	Sun Sep 28 15:46:36 2008 +0900
@@ -106,7 +106,7 @@
 		}
 	}
 
-	private boolean checkSend() {
+	private boolean checkSend() throws IOException {
 		for(Iterator<PacketSet> it = waitingCommandInMerge.iterator(); it.hasNext();){
 			PacketSet p = it.next();
 			if(p.getEditor().isMerging()) {
@@ -155,7 +155,7 @@
 		channel.register(selector, ops, handler);
 	}
 
-	public void manage(REPSocketChannel<REPCommand> channel, REPCommand receivedCommand) {
+	public void manage(REPSocketChannel<REPCommand> channel, REPCommand receivedCommand) throws IOException {
 		if(receivedCommand == null) return;
 		//Session session;
 		REPCommand sendCommand = new REPCommand(receivedCommand);
@@ -377,6 +377,7 @@
 		{
 			//sid から Session を取得
 			Session session = getSession(receivedCommand.sid);
+			if (session==null) throw new IOException();
 			//マージの処理と次のエディタへコマンドを送信する処理
 			session.translate(channel, receivedCommand);