From 4e6ca6bf412d2fbd9d2864dcefb8515a3976e9ea Mon Sep 17 00:00:00 2001 From: wangyipeng Date: Fri, 3 Jan 2025 16:31:50 +0800 Subject: [PATCH] fix:troubleshoot the udp channel exception Signed-off-by: wangyipeng --- .../udp_negotiation/src/trans_udp_negotiation.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/transmission/trans_channel/udp_negotiation/src/trans_udp_negotiation.c b/core/transmission/trans_channel/udp_negotiation/src/trans_udp_negotiation.c index a061bea95e..f393d31e39 100644 --- a/core/transmission/trans_channel/udp_negotiation/src/trans_udp_negotiation.c +++ b/core/transmission/trans_channel/udp_negotiation/src/trans_udp_negotiation.c @@ -706,6 +706,17 @@ static void TransOnExchangeUdpInfoRequest(AuthHandle authHandle, int64_t seq, co ProcessAbnormalUdpChannelState(&info, ret, false); goto ERR_EXIT; } + + if (info.udpChannelOptType == TYPE_UDP_CHANNEL_CLOSE) { + ret = SendReplyUdpInfo(&info, authHandle, seq); + if (ret != SOFTBUS_OK) { + TRANS_LOGE(TRANS_CTRL, "send reply udp info failed. ret=%{public}d.", ret); + errDesc = (char *)"send reply error"; + ProcessAbnormalUdpChannelState(&info, ret, false); + goto ERR_EXIT; + } + ReportUdpRequestHandShakeReplyEvent(&info, &extra, EVENT_STAGE_RESULT_OK, SOFTBUS_OK); + } return; ERR_EXIT: ReportUdpRequestHandShakeReplyEvent(&info, &extra, EVENT_STAGE_RESULT_FAILED, ret); -- Gitee