Skip to content

Review invocation of UpgradeListener.onHandshakeResponse() in case of failures #13465

@sbordet

Description

@sbordet

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.

Metadata

Metadata

Labels

BugFor general bugs on Jetty side

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions