Skip to content

Commit 61e35df

Browse files
committed
Refactor: adjust ShenyuWebHandler reactive pipeline to remove Mono.defer and change before execution timing, and add VS Code settings and e2e test logs.
1 parent 4535fbf commit 61e35df

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

shenyu-web/src/main/java/org/apache/shenyu/web/handler/ShenyuWebHandler.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,9 @@ public void after(final ServerWebExchange exchange) {
136136
*/
137137
@Override
138138
public Mono<Void> handle(@NonNull final ServerWebExchange exchange) {
139-
return Mono.defer(() -> {
140-
before(exchange);
141-
return new DefaultShenyuPluginChain(plugins).execute(exchange);
142-
}).doOnError(Throwable.class, e -> LOG.error("shenyu execute plugin exception: ", e))
139+
before(exchange);
140+
return new DefaultShenyuPluginChain(plugins).execute(exchange)
141+
.doOnError(Throwable.class, e -> LOG.error("shenyu execute plugin exception: ", e))
143142
.doFinally(signalType -> after(exchange))
144143
.subscribeOn(scheduled ? scheduler : Schedulers.immediate());
145144
}

0 commit comments

Comments
 (0)