--- a/src/java.net.http/share/classes/jdk/internal/net/http/websocket/WebSocketImpl.java Mon Mar 19 17:04:28 2018 +0000
+++ b/src/java.net.http/share/classes/jdk/internal/net/http/websocket/WebSocketImpl.java Mon Mar 19 19:52:43 2018 +0000
@@ -456,10 +456,9 @@
public void run() {
debug.log(Level.DEBUG, "enter receive task");
loop:
- while (true) {
+ while (!receiveScheduler.isStopped()) {
State s = state.get();
debug.log(Level.DEBUG, "receive state: %s", s);
-
try {
switch (s) {
case OPEN:
--- a/test/jdk/java/net/httpclient/websocket/MockListener.java Mon Mar 19 17:04:28 2018 +0000
+++ b/test/jdk/java/net/httpclient/websocket/MockListener.java Mon Mar 19 19:52:43 2018 +0000
@@ -180,6 +180,7 @@
@Override
public void onError(WebSocket webSocket, Throwable error) {
System.out.printf("onError(%s, %s)%n", webSocket, error);
+ error.printStackTrace(System.out);
OnError inv = new OnError(webSocket, error == null ? null : error.getClass());
synchronized (invocations) {
invocations.add(inv);