Skip to content

Commit

Permalink
fix[DispatcherHandler]: 空消息未释放的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
hylexus committed Feb 24, 2025
1 parent 678446c commit 82f6984
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
org.gradle.jvmargs=-Dio.netty.allocator.type=unpooled
projectGroup=io.github.hylexus.jt
projectVersion=2.3.0-rc.3
projectVersion=2.3.0-rc.4
# scm
projectScmUrl=https://github.com/hylexus/jt-framework
projectScmConnection=scm:git:[email protected]:hylexus/jt-framework.git
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,11 @@ private Jt808HandlerResult processException(

protected void handleResult(Jt808ServerExchange exchange, Jt808HandlerResult result) {
if (!this.lifecycleListener.beforeEncode(exchange, result)) {
exchange.response().release();
return;
}
if (Jt808HandlerResult.isEmptyResult(result)) {
exchange.response().release();
return;
}
final Jt808HandlerResultHandler resultHandler = getResultHandler(result, exchange);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public BuiltinServerCommonReplyMsg processLocationUploadMsgV2019(Jt808RequestEnt
@Jt808RequestHandlerMapping(msgType = 0x0200, versions = VERSION_2013)
public BuiltinServerCommonReplyMsg processLocationUploadMsgV2013(Jt808RequestEntity<BuiltinMsg0200V2013Alias> request, Jt808Session session) {
final BuiltinMsg0200V2013Alias body = request.body();
log.info("LocationUpload -- V2019 -- {}", body);
log.info("LocationUpload -- V2013 -- {}", body);

// 这里演示性的记录一下当前会话对应的终端最近一次上报的经纬度
// 这里仅仅是为方便演示才将最近一次地理位置信息存储到内存中的 实际上你应该使用外部存储介质!!!(否则终端断开连接,session销毁, 数据也就没了)
Expand Down

0 comments on commit 82f6984

Please sign in to comment.