[jboss-remoting-commits] JBoss Remoting SVN: r4081 - remoting2/branches/2.x/src/main/org/jboss/remoting.

jboss-remoting-commits at lists.jboss.org jboss-remoting-commits at lists.jboss.org
Sat Apr 26 14:05:24 EDT 2008


Author: ron.sigal at jboss.com
Date: 2008-04-26 14:05:24 -0400 (Sat, 26 Apr 2008)
New Revision: 4081

Modified:
   remoting2/branches/2.x/src/main/org/jboss/remoting/ConnectionValidator.java
Log:
JBREM-947: Fixed potential NullPointerException in WaitOnConnectionCheckTimerTask.

Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/ConnectionValidator.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/ConnectionValidator.java	2008-04-25 21:30:31 UTC (rev 4080)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/ConnectionValidator.java	2008-04-26 18:05:24 UTC (rev 4081)
@@ -660,8 +660,17 @@
             {
                log.debug(this + " detected connection failure: stopping LeasePinger");
                MicroRemoteClientInvoker invoker = (MicroRemoteClientInvoker) client.getInvoker();
-               invoker.terminateLease(null, client.getDisconnectTimeout());
-               log.debug(this + " shut down lease pinger");
+               
+               if (invoker != null)
+               {
+                  invoker.terminateLease(null, client.getDisconnectTimeout());
+                  log.debug(ConnectionValidator.this + " shut down lease pinger");
+               }
+               else
+               {
+                  log.debug(ConnectionValidator.this + " unable to shut down lease pinger: client must have shut down");
+               }
+               
                cancel();
             }
          }




More information about the jboss-remoting-commits mailing list