Fix implementation of isOpen() in ReactorNettyWebSocketSession
See gh-26332 for details. Closes gh-26341
This commit is contained in:
parent
4f6d26b25c
commit
bd2edf26df
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -13,6 +13,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.web.reactive.socket.adapter;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
|
@ -33,7 +34,6 @@ import org.springframework.web.reactive.socket.HandshakeInfo;
|
|||
import org.springframework.web.reactive.socket.WebSocketMessage;
|
||||
import org.springframework.web.reactive.socket.WebSocketSession;
|
||||
|
||||
|
||||
/**
|
||||
* {@link WebSocketSession} implementation for use with the Reactor Netty's
|
||||
* {@link NettyInbound} and {@link NettyOutbound}.
|
||||
|
|
@ -100,7 +100,7 @@ public class ReactorNettyWebSocketSession
|
|||
public boolean isOpen() {
|
||||
DisposedCallback callback = new DisposedCallback();
|
||||
getDelegate().getInbound().withConnection(callback);
|
||||
return callback.isDisposed();
|
||||
return !callback.isDisposed();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in New Issue