Author: ron.sigal(a)jboss.com
Date: 2010-12-28 13:39:39 -0500 (Tue, 28 Dec 2010)
New Revision: 6199
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/ClientSocketWrapper.java
Log:
JBREM-1263: checkConnection() verifies the returned byte is the same one that was sent.
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/ClientSocketWrapper.java
===================================================================
---
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/ClientSocketWrapper.java 2010-12-27
18:43:19 UTC (rev 6198)
+++
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/ClientSocketWrapper.java 2010-12-28
18:39:39 UTC (rev 6199)
@@ -102,6 +102,12 @@
out.write(ACK);
out.flush();
int i = in.read();
+
+ if (i != ACK)
+ {
+ throw new IOException("got " + i + " instead of " + ACK);
+ }
+
if (trace) { log.trace(this + " got " + i + " while checking
connection"); }
}
Show replies by date