Skip to content

Expose a public method "isClosed" to indicate whether the connection has been closed in WebSocketSession (WebFlux) #26043

@JamesChenX

Description

@JamesChenX

Context

spring-webflux:5.3.0.
org.springframework.web.reactive.socket.WebSocketSession

Motivation

It's common to decide what to do next according to the status (open or closed) of "WebSocketSession".
And we know WebSocketSession#closeStatus can be used as a workaround to know whether a session has been closed but it's troublesome to check the status of a session in that way.

Solution

Expose a public method like "isClosed" to indicate whether the connection has been closed in WebSocketSession (WebFlux)

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions