This is an automated email from the ASF dual-hosted git repository.

impactcn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu.git


The following commit(s) were added to refs/heads/master by this push:
     new 2d42509ef0 [type:refactor] refactor plugin lifecycle (#5432)
2d42509ef0 is described below

commit 2d42509ef0dd35d64479d43c464679e49af567f4
Author: moremind <[email protected]>
AuthorDate: Fri Feb 2 17:36:30 2024 +0800

    [type:refactor] refactor plugin lifecycle (#5432)
---
 .../java/org/apache/shenyu/web/handler/ShenyuWebHandler.java   | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git 
a/shenyu-web/src/main/java/org/apache/shenyu/web/handler/ShenyuWebHandler.java 
b/shenyu-web/src/main/java/org/apache/shenyu/web/handler/ShenyuWebHandler.java
index e9c7e00d25..461234a6d7 100644
--- 
a/shenyu-web/src/main/java/org/apache/shenyu/web/handler/ShenyuWebHandler.java
+++ 
b/shenyu-web/src/main/java/org/apache/shenyu/web/handler/ShenyuWebHandler.java
@@ -266,10 +266,12 @@ public final class ShenyuWebHandler implements 
WebHandler, ApplicationListener<P
                     if (skip) {
                         return this.execute(exchange);
                     }
-                    plugin.before(exchange);
-                    Mono<Void> execute = plugin.execute(exchange, this);
-                    plugin.after(exchange);
-                    return execute;
+                    try {
+                        plugin.before(exchange);
+                        return plugin.execute(exchange, this);
+                    } finally {
+                        plugin.after(exchange);
+                    }
                 }
                 return Mono.empty();
             });

Reply via email to