You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Debiprasanna Tripathy <de...@gmail.com> on 2009/12/03 00:24:47 UTC

Re: ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error

 
Hi Paul,

This usually happens when a client canceled the request, e.g. by clicking
'Cancel' while the page is still being loaded. 

You can do the following code to avoid to log  

catch(Exception e){ // catch the Exception

 String  clientAbortException = "";
 index = e.toString().indexOf(":");
  if(index != 0){
     clientAbortException = e.toString().substring(0, index );
   }
  if("ClientAbortException" .equalsIgnoreCase(clientAbortException)) { //
check it the exception is the 
                                                                                       
// ClientAbortException  then do nothing
    //	Down Loading Canceled  by the Client
     if (out != null) {
	try{
	  if(out != null)
	    out.close();  // close the output stream
	  if(in != null)
	    in.close(); // close the input stream
	}
	catch(Exception ee){
	// catch  nothing
	}
      }
    }
}

Regards,
Debiprasanna Tripathy

-- 
View this message in context: http://old.nabble.com/ClientAbortException%3A--java.net.SocketException%3A-Connection-reset-by-peer%3A-socket-write-error-tp26406293p26618446.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org