Jetty version(s)
12.1.x
Description
WebSocket's core client UpgradeListener.onHandshakeResponse() is invoked from CoreClientUpgradeRequest.upgrade(), which sets the upgraded field, but also from CoreClientUpgradeRequest.onComplete() that reads the upgraded field.
I think it is possible that CoreClientUpgradeRequest.upgrade() calls UpgradeListener.onHandshakeResponse() which may throw, and eventually CoreClientUpgradeRequest.onComplete() might be called and call UpgradeListener.onHandshakeResponse() again.
We need to write a test case that throws from UpgradeListener.onHandshakeResponse() and verify what happens.