Author: ron.sigal(a)jboss.com
Date: 2010-12-28 13:41:16 -0500 (Tue, 28 Dec 2010)
New Revision: 6200
Modified:
remoting2/branches/2.2/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.2/src/main/org/jboss/remoting/transport/socket/ClientSocketWrapper.java
===================================================================
---
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/ClientSocketWrapper.java 2010-12-28
18:39:39 UTC (rev 6199)
+++
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/ClientSocketWrapper.java 2010-12-28
18:41:16 UTC (rev 6200)
@@ -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