You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by na...@apache.org on 2006/04/26 03:10:15 UTC
svn commit: r397038 -
/webservices/axis/trunk/c/tests/utils/monitor/org/apache/test/ClientReturner.java
Author: nadiramra
Date: Tue Apr 25 18:10:11 2006
New Revision: 397038
URL: http://svn.apache.org/viewcvs?rev=397038&view=rev
Log:
If IO exception occurs on socket, end test by getting out of the loop reading from the server
and closing socket.
Modified:
webservices/axis/trunk/c/tests/utils/monitor/org/apache/test/ClientReturner.java
Modified: webservices/axis/trunk/c/tests/utils/monitor/org/apache/test/ClientReturner.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/utils/monitor/org/apache/test/ClientReturner.java?rev=397038&r1=397037&r2=397038&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/utils/monitor/org/apache/test/ClientReturner.java (original)
+++ webservices/axis/trunk/c/tests/utils/monitor/org/apache/test/ClientReturner.java Tue Apr 25 18:10:11 2006
@@ -88,8 +88,7 @@
while (continueToRun)
{
bytesRead=serverResponseStream.read(readBuffer, 0, READ_BUFFER_SIZE);
- // System.out.println( "Clientreturner got some bytes from the
- // server "+bytesRead);
+
if (bytesRead!=-1)
{
/*System.out.println("ClientReturner#run("+number
@@ -100,15 +99,18 @@
{
streamToClient.write(readBuffer, 0, bytesRead);
streamToClient.flush( );
+
+ TCPMonitor.getInstance( ).writeResponse(readBuffer,bytesRead);
+ System.out.println("About to go around again");
}
catch (IOException exception)
{
System.err.println("IOException when writing server response back to client");
exception.printStackTrace(System.err);
+
+ // the socket to client is broken, so stop.
+ continueToRun=false;
}
- // System.out.println("ClientReturner#run(): flushed");
- TCPMonitor.getInstance( ).writeResponse(readBuffer,bytesRead);
- System.out.println("About to go around again");
}
else
{