spring-graphql/src/testFixtures/java/org/springframework/graphql/server/TestWebSocketConnection.java
/**
	 * Handle the session and complete it when handling completes.
	 */
Handle the session and complete it when handling completes.
Handle the session and complete it when handling completes .
private Mono<Void> invokeHandler(WebSocketHandler handler, TestWebSocketSession session, boolean isClient) {
		return handler.handle(session)
				.then(Mono.defer(() -> session.close(CloseStatus.NORMAL)))
				.onErrorResume(ex -> {
					logger.error("Unhandled " + (isClient ? "client" : "server") + " error: " + ex.getMessage());
					return session.close(CloseStatus.PROTOCOL_ERROR).then(Mono.error(ex));
				});
	}
private Mono < Void > invokeHandler ( WebSocketHandler handler , TestWebSocketSession session , boolean isClient ) { return handler . handle ( session ) . then ( Mono . defer ( ( ) -> session . close ( CloseStatus . NORMAL ) ) ) . onErrorResume ( ex -> { logger . error ( "Unhandled " + ( isClient ? "client" : "server" ) + " error: " + ex . getMessage ( ) ) ; return session . close ( CloseStatus . PROTOCOL_ERROR ) . then ( Mono . error ( ex ) ) ; } ) ; }
Handle the session and complete it when handling completes.
Handle the session and complete it when handling completes .