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();
}
Comment From: sbrannen
Good catch!
@JamesChenX, would you like to submit a PR for the fix?
Comment From: sbrannen
Superseded by #26341.