changeset 23706:5ea287e13cdb

8038940: c.s.j.r.i.ClientNotifForwarder$LinearExecutor Reviewed-by: dfuchs, jbachorik
author sjiang
date Wed, 02 Apr 2014 14:57:17 +0200
parents 6dbe0ae69dc3
children 4580f737d5b9
files jdk/src/share/classes/com/sun/jmx/remote/internal/ClientNotifForwarder.java
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/src/share/classes/com/sun/jmx/remote/internal/ClientNotifForwarder.java	Wed Apr 02 12:20:01 2014 +0000
+++ b/jdk/src/share/classes/com/sun/jmx/remote/internal/ClientNotifForwarder.java	Wed Apr 02 14:57:17 2014 +0200
@@ -787,6 +787,14 @@
             if (!reconnected) {
                 try {
                     NotificationResult nr = fetchNotifs(-1, 0, 0);
+
+                    if (state != STOPPED) { // JDK-8038940
+                                            // reconnection must happen during
+                                            // fetchNotifs(-1, 0, 0), and a new
+                                            // thread takes over the fetching job
+                        return;
+                    }
+
                     clientSequenceNumber = nr.getNextSequenceNumber();
                 } catch (ClassNotFoundException e) {
                     // can't happen