Author: ron.sigal(a)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();
}
}
Show replies by date