Improve error message

Issue: SPR-16214
This commit is contained in:
Rossen Stoyanchev 2018-01-08 21:30:41 -05:00
parent 74b5c371ba
commit 30c0616384
1 changed files with 4 additions and 3 deletions

View File

@ -70,9 +70,10 @@ public class ReactorNettyWebSocketSession
@Override
public Mono<Void> close(CloseStatus status) {
return Mono.error(new UnsupportedOperationException(
"Currently in Reactor Netty applications are expected to use the " +
"Cancellation returned from subscribing to the \"receive\"-side Flux " +
"in order to close the WebSocket session."));
"Reactor Netty does not support closing the session from anywhere. " +
"You will need to work with the Flux returned from receive() method, " +
"either subscribing to it and using the returned Disposable, " +
"or using an operator that cancels (e.g. take)."));
}