[jboss-cvs] JBossRemoting/src/main/org/jboss/remoting ...
Ron Sigal
ron_sigal at yahoo.com
Sun Aug 5 15:57:28 EDT 2007
User: rsigal
Date: 07/08/05 15:57:28
Modified: src/main/org/jboss/remoting Tag: remoting_2_2_0_GA
LeasePinger.java
Log:
JBREM-783: Guard against null holder in removeClient().
Revision Changes Path
No revision
No revision
1.8.2.12.2.3 +10 -3 JBossRemoting/src/main/org/jboss/remoting/LeasePinger.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: LeasePinger.java
===================================================================
RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/LeasePinger.java,v
retrieving revision 1.8.2.12.2.2
retrieving revision 1.8.2.12.2.3
diff -u -b -r1.8.2.12.2.2 -r1.8.2.12.2.3
--- LeasePinger.java 4 Aug 2007 20:39:14 -0000 1.8.2.12.2.2
+++ LeasePinger.java 5 Aug 2007 19:57:28 -0000 1.8.2.12.2.3
@@ -163,6 +163,13 @@
ClientHolder holder = (ClientHolder)clients.remove(sessionID);
if(trace) { log.trace(this + " removing client with session ID " + sessionID); }
+ if (holder == null)
+ {
+ log.warn(this + " tried to remove lease for client with session ID "
+ + sessionID + ", but no such lease was found");
+ return false;
+ }
+
if (clients.isEmpty())
{
isLastClientLease = true;
@@ -206,7 +213,7 @@
public void disconnectClient(String sessionID)
{
- if(trace) { log.trace(this + " disconnection client with session ID " + sessionID); }
+ if(trace) { log.trace(this + " disconnecting client with session ID " + sessionID); }
ClientHolder holder = (ClientHolder)clients.remove(sessionID);
@@ -240,8 +247,8 @@
}
else
{
- log.warn(this + " tried to remove lease for client with session ID " + sessionID +
- ", but no such lease was found");
+ log.warn(this + " tried to disconnect client with session ID "
+ + sessionID + ", but no such lease was found");
}
}
More information about the jboss-cvs-commits
mailing list