Mercurial > hg > Database > Alice
changeset 50:cc440cb8582e
bug fix for write() at OutboundTCPConnection
author | kazz <kazz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 04 Feb 2012 21:08:38 +0900 |
parents | ed0ff4512e8c |
children | 919389066887 |
files | build.xml src/alice/daemon/OutboundTcpConnection.java |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/build.xml Sat Feb 04 19:26:07 2012 +0900 +++ b/build.xml Sat Feb 04 21:08:38 2012 +0900 @@ -36,7 +36,7 @@ <pathelement path="lib/log4j-1.2.16.jar" /> <pathelement path="lib/slf4j-api-1.6.1.jar" /> <pathelement path="lib/slf4j-log4j12-1.6.1.jar" /> - <pathelement path="lib/msgpack-0.6.5-SNAPSHOT.jar" /> + <pathelement path="lib/msgpack-0.6.6-SNAPSHOT.jar" /> <pathelement path="lib/com.alexmerz.graphviz.jar" /> </classpath> <sourcepath>
--- a/src/alice/daemon/OutboundTcpConnection.java Sat Feb 04 19:26:07 2012 +0900 +++ b/src/alice/daemon/OutboundTcpConnection.java Sat Feb 04 21:08:38 2012 +0900 @@ -38,7 +38,9 @@ buffer.putInt(buf.length); buffer.put(buf); buffer.flip(); - connection.socket.getChannel().write(buffer); + while (buffer.hasRemaining()) { + connection.socket.getChannel().write(buffer); + } } catch (InterruptedException e) { e.printStackTrace(); } catch (IOException e) {