8038940: c.s.j.r.i.ClientNotifForwarder$LinearExecutor
Reviewed-by: dfuchs, jbachorik
--- 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