Use WebsocketOutbound#sendClose
Switch to using the sendClose method available since Reactor Netty 0.8 vs explicitly sending a CloseWebSocketFrame. Related to SPR-17306, but does not address the root cause.
This commit is contained in:
parent
e63bffcfa0
commit
1320fed7fe
|
|
@ -15,7 +15,6 @@
|
|||
*/
|
||||
package org.springframework.web.reactive.socket.adapter;
|
||||
|
||||
import io.netty.handler.codec.http.websocketx.CloseWebSocketFrame;
|
||||
import io.netty.handler.codec.http.websocketx.WebSocketFrame;
|
||||
import org.reactivestreams.Publisher;
|
||||
import reactor.core.publisher.Flux;
|
||||
|
|
@ -98,8 +97,7 @@ public class ReactorNettyWebSocketSession
|
|||
|
||||
@Override
|
||||
public Mono<Void> close(CloseStatus status) {
|
||||
WebSocketFrame closeFrame = new CloseWebSocketFrame(status.getCode(), status.getReason());
|
||||
return getDelegate().getOutbound().sendObject(closeFrame).then();
|
||||
return getDelegate().getOutbound().sendClose(status.getCode(), status.getReason());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue