[jboss-cvs] JBossRemoting/src/main/org/jboss/remoting ...
Tom Elrod
tom.elrod at jboss.com
Mon Dec 11 23:55:30 EST 2006
User: telrod
Date: 06/12/11 23:55:30
Modified: src/main/org/jboss/remoting Tag: remoting_2_x Client.java
ConnectionValidator.java
Log:
JBREM-648 - fix for NPE on connection validator after client disconnect.
Revision Changes Path
No revision
No revision
1.53.2.10 +7 -1 JBossRemoting/src/main/org/jboss/remoting/Client.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Client.java
===================================================================
RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/Client.java,v
retrieving revision 1.53.2.9
retrieving revision 1.53.2.10
diff -u -b -r1.53.2.9 -r1.53.2.10
--- Client.java 12 Dec 2006 03:48:04 -0000 1.53.2.9
+++ Client.java 12 Dec 2006 04:55:30 -0000 1.53.2.10
@@ -63,7 +63,7 @@
*
* @author <a href="mailto:jhaynie at vocalocity.net">Jeff Haynie</a>
* @author <a href="mailto:telrod at e2technologies.net">Tom Elrod</a>
- * @version $Revision: 1.53.2.9 $
+ * @version $Revision: 1.53.2.10 $
*/
public class Client implements Externalizable
{
@@ -534,6 +534,12 @@
enableLease = false;
}
+ if (connectionValidator!=null)
+ {
+ connectionValidator.stop();
+ connectionValidator = null;
+ }
+
/**
* Need to remove myself from registry so will not keep
* reference to me since I am of no use now. Will have to create
1.13.2.1 +10 -5 JBossRemoting/src/main/org/jboss/remoting/ConnectionValidator.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ConnectionValidator.java
===================================================================
RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/ConnectionValidator.java,v
retrieving revision 1.13
retrieving revision 1.13.2.1
diff -u -b -r1.13 -r1.13.2.1
--- ConnectionValidator.java 11 Oct 2006 20:22:41 -0000 1.13
+++ ConnectionValidator.java 12 Dec 2006 04:55:30 -0000 1.13.2.1
@@ -66,9 +66,13 @@
TimerUtil.schedule(this, pingPeriod);
}
- private void stop()
+ public void stop()
{
cancel();
+ if (!listeners.isEmpty())
+ {
+ listeners.clear();
+ }
}
@@ -158,10 +162,11 @@
{
boolean pingWorked = false;
- HashMap configMap = new HashMap();
- if (config != null)
- configMap.putAll(config);
-
+ Map configMap = config;
+ if (configMap == null)
+ {
+ configMap = new HashMap();
+ }
configMap.put("connection_checker", "true");
configMap.put("timeout", "1000");
configMap.put("NumberOfRetries", "1");
More information about the jboss-cvs-commits
mailing list