File tree Expand file tree Collapse file tree
rsocket-core/src/main/java/io/rsocket Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -228,28 +228,21 @@ public Mono<RSocket> start() {
228228 ackTimeout ,
229229 missedAcks );
230230
231- Mono <RSocket > wrappedRSocketClient =
232- Mono .just (rSocketClient ).map (plugins ::applyClient );
233-
234- DuplexConnection finalConnection = connection ;
235- return wrappedRSocketClient .flatMap (
236- wrappedClientRSocket -> {
237- RSocket unwrappedServerSocket = acceptor .get ().apply (wrappedClientRSocket );
238-
239- Mono <RSocket > wrappedRSocketServer =
240- Mono .just (unwrappedServerSocket ).map (plugins ::applyServer );
241-
242- return wrappedRSocketServer
243- .doOnNext (
244- rSocket ->
245- new RSocketServer (
246- multiplexer .asServerConnection (),
247- rSocket ,
248- frameDecoder ,
249- errorConsumer ))
250- .then (finalConnection .sendOne (setupFrame ))
251- .then (wrappedRSocketClient );
252- });
231+ RSocket wrappedRSocketClient = plugins .applyClient (rSocketClient );
232+
233+ RSocket unwrappedServerSocket = acceptor .get ().apply (wrappedRSocketClient );
234+
235+ RSocket wrappedRSocketServer = plugins .applyServer (unwrappedServerSocket );
236+
237+ RSocketServer rSocketServer = new RSocketServer (
238+ multiplexer .asServerConnection (),
239+ wrappedRSocketServer ,
240+ frameDecoder ,
241+ errorConsumer );
242+
243+ return connection
244+ .sendOne (setupFrame )
245+ .thenReturn (wrappedRSocketClient );
253246 });
254247 }
255248 }
You can’t perform that action at this time.
0 commit comments