[jboss-cvs] JBossRemoting/src/main/org/jboss/remoting/transport/multiplex ...
Ron Sigal
ron_sigal at yahoo.com
Sat Jul 22 17:56:29 EDT 2006
User: rsigal
Date: 06/07/22 17:56:29
Modified: src/main/org/jboss/remoting/transport/multiplex
MasterServerSocket.java
Log:
JBREM-534: Added savedException in accept() so that if the setSoTimeout() in the finally clause throws an exception, the original exception doesn't get lost.
Revision Changes Path
1.10 +11 -2 JBossRemoting/src/main/org/jboss/remoting/transport/multiplex/MasterServerSocket.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: MasterServerSocket.java
===================================================================
RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/transport/multiplex/MasterServerSocket.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- MasterServerSocket.java 19 Jul 2006 23:22:28 -0000 1.9
+++ MasterServerSocket.java 22 Jul 2006 21:56:29 -0000 1.10
@@ -299,6 +299,7 @@
int savedTimeout = timeout;
int timeLeft = 0;
Socket socket = null;
+ SocketTimeoutException savedException = null;
while (true)
{
@@ -315,12 +316,20 @@
catch (SocketTimeoutException e)
{
// NIO ServerSocket doesn't set message.
- throw new SocketTimeoutException("Accept timed out");
+ savedException = new SocketTimeoutException("Accept timed out");
+ throw savedException;
}
finally
{
+ try
+ {
setSoTimeout(savedTimeout);
}
+ catch (Exception e) {}
+
+ if (savedException != null)
+ throw savedException;
+ }
MultiplexingManager manager = MultiplexingManager.getaManager(socket, configuration);
MultiplexingInputStream is = null;
More information about the jboss-cvs-commits
mailing list