Skip to content

The implementaion of isOpen() in ReactorNettyWebSocketSession is wrong #26332

@JamesChenX

Description

@JamesChenX

Affects: 5.3.2

The implementation of isOpen() in org.springframework.web.reactive.socket.adapter.ReactorNettyWebSocketSession is wrong.

Implementation

	@Override
	public boolean isOpen() {
		DisposedCallback callback = new DisposedCallback();
		getDelegate().getInbound().withConnection(callback);
		return callback.isDisposed(); // Wrong
	}

It should be:

	@Override
	public boolean isOpen() {
		DisposedCallback callback = new DisposedCallback();
		getDelegate().getInbound().withConnection(callback);
		return !callback.isDisposed();
	}

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: webIssues in web modules (web, webmvc, webflux, websocket)status: supersededAn issue that has been superseded by anothertype: bugA general bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions