# HG changeset patch # User sjiang # Date 1396443437 -7200 # Node ID 5ea287e13cdb2ee246be76317b0b56678ed60114 # Parent 6dbe0ae69dc354dd5fd059b6df747a9c459c531a 8038940: c.s.j.r.i.ClientNotifForwarder$LinearExecutor Reviewed-by: dfuchs, jbachorik diff -r 6dbe0ae69dc3 -r 5ea287e13cdb jdk/src/share/classes/com/sun/jmx/remote/internal/ClientNotifForwarder.java --- 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