This can be reproduced with a simple snippet of code. It is intermittent.
ws.sendClose().get();
ws.abort();
It sometimes throws following error:
java.lang.InternalError: Unexpected onClose in state ABORTED
at java.net.http.WS$1.onClose(
java.httpclient@9-internal/WS.java:260
)
at java.net.http.WSReceiver$MessageConsumer.onClose(
java.httpclient@9-internal/WSReceiver.java:228
)
at java.net.http.WSFrameConsumer.endFrame(
java.httpclient@9-internal/WSFrameConsumer.java:252
)
at java.net.http.WSFrame$Reader.readFrame(
java.httpclient@9-internal/WSFrame.java:465
)
at java.net.http.WSReceiver.react(
java.httpclient@9-internal/WSReceiver.java:86
)
at java.net.http.WSSignalHandler.lambda$new$1(
java.httpclient@9-internal/WSSignalHandler.java:80
)
at java.util.concurrent.ThreadPoolExecutor.runWorker(
java.base@9-internal/ThreadPoolExecutor.java:1158
)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(
java.base@9-internal/ThreadPoolExecutor.java:632
)
at java.lang.Thread.run(
java.base@9-internal/Thread.java:843)
ws.sendClose().get();
ws.abort();
It sometimes throws following error:
java.lang.InternalError: Unexpected onClose in state ABORTED
at java.net.http.WS$1.onClose(
java.httpclient@9-internal/WS.java:260
)
at java.net.http.WSReceiver$MessageConsumer.onClose(
java.httpclient@9-internal/WSReceiver.java:228
)
at java.net.http.WSFrameConsumer.endFrame(
java.httpclient@9-internal/WSFrameConsumer.java:252
)
at java.net.http.WSFrame$Reader.readFrame(
java.httpclient@9-internal/WSFrame.java:465
)
at java.net.http.WSReceiver.react(
java.httpclient@9-internal/WSReceiver.java:86
)
at java.net.http.WSSignalHandler.lambda$new$1(
java.httpclient@9-internal/WSSignalHandler.java:80
)
at java.util.concurrent.ThreadPoolExecutor.runWorker(
java.base@9-internal/ThreadPoolExecutor.java:1158
)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(
java.base@9-internal/ThreadPoolExecutor.java:632
)
at java.lang.Thread.run(
java.base@9-internal/Thread.java:843)