Skip to content

Commit 683758e

Browse files
修复异步有时会不响应的bug
1 parent eb6c2dc commit 683758e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/main/java/com/github/netty/protocol/servlet/NettyMessageToServletRunnable.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,6 @@ public void run() {
284284
} catch (Throwable e) {
285285
logger.warn("handleErrorPage error = {}", e.toString(), e);
286286
} finally {
287-
if (dispatcher != null) {
288-
dispatcher.recycle();
289-
}
290287
/*
291288
* If not asynchronous, or asynchronous has ended
292289
* each response object is valid only if it is within the scope of the servlet's service method or the filter's doFilter method, unless the
@@ -308,6 +305,9 @@ public void run() {
308305
}
309306
}
310307
} else {
308+
if (dispatcher != null) {
309+
dispatcher.recycle();
310+
}
311311
//Not asynchronous direct collection
312312
exchange.close();
313313
}

0 commit comments

Comments
 (0)