# HG changeset patch # User kazz # Date 1328248745 -32400 # Node ID 92aeb6e34683186f6bd4eef4774674105bfc5918 # Parent f9334781344aea3d58372aa0b9afbe63ab21ea7e implements close exception diff -r f9334781344a -r 92aeb6e34683 scripts/log.rb --- a/scripts/log.rb Thu Feb 02 10:48:39 2012 +0900 +++ b/scripts/log.rb Fri Feb 03 14:59:05 2012 +0900 @@ -12,7 +12,7 @@ end if header[5] == "TAKE" || header[5] == "PEEK" then puts '"' + data[4].split(" ")[0].split("=")[1].split(".")[-1] + '"' + ' [shape="box", fontname="Ricty"]' - print '"' + header[3] + "." + data[1] + '"' + ' [shape="box", fontname="Ricty"]' + print '"' + header[3] + "." + data[1] + '"' + ' [fontname="Ricty"]' print '"' + header[3] + "." + data[1] + '"' print " -> " print '"' + data[4].split(" ")[0].split("=")[1].split(".")[-1] + '"' @@ -21,7 +21,7 @@ end if header[5] == "PUT" || header[5] == "UPDATE" then puts '"' + data[4].split(" ")[0].split("=")[1].split(".")[-1] + '"' + ' [shape="box", fontname="Ricty"]' - puts '"' + header[3] + "." + data[1] + '"' + ' [shape="box", fontname="Ricty"]' + puts '"' + header[3] + "." + data[1] + '"' + ' [fontname="Ricty"]' print '"' + data[4].split(" ")[0].split("=")[1].split(".")[-1] + '"' print " -> " print '"' + header[3] + "." + data[1] + '"' diff -r f9334781344a -r 92aeb6e34683 src/alice/daemon/IncomingTcpConnection.java --- a/src/alice/daemon/IncomingTcpConnection.java Thu Feb 02 10:48:39 2012 +0900 +++ b/src/alice/daemon/IncomingTcpConnection.java Fri Feb 03 14:59:05 2012 +0900 @@ -2,6 +2,7 @@ import java.io.IOException; import java.nio.ByteBuffer; +import java.nio.channels.ClosedChannelException; import java.nio.channels.SocketChannel; import org.msgpack.MessagePack; @@ -78,6 +79,8 @@ default: break; } + } catch (ClosedChannelException e) { + return; } catch (IOException e) { e.printStackTrace(); } diff -r f9334781344a -r 92aeb6e34683 src/alice/topology/manager/StartTopologyManager.java --- a/src/alice/topology/manager/StartTopologyManager.java Thu Feb 02 10:48:39 2012 +0900 +++ b/src/alice/topology/manager/StartTopologyManager.java Fri Feb 03 14:59:05 2012 +0900 @@ -53,13 +53,13 @@ LinkedList sources = topology.get(target); NodeInfo nodeInfo = new NodeInfo(source, connection); sources.add(nodeInfo); - hash.put(source + target, nodeInfo); + hash.put(source + "," + target, nodeInfo); } for (Edge edge : edges) { String connection = edge.getAttribute("label"); String source = edge.getSource().getNode().getId().getId(); String target = edge.getTarget().getNode().getId().getId(); - NodeInfo nodeInfo = hash.get(target + source); + NodeInfo nodeInfo = hash.get(target + "," + source); if (nodeInfo != null) { nodeInfo.reverseName = connection; }