Skip to content

Commit

Permalink
添加了针对发送报文保护非UTF-8字符报错的时候的异常处理函数,直接当作异常连接处理
Browse files Browse the repository at this point in the history
  • Loading branch information
KOROyo123 committed Jun 4, 2024
1 parent 51cd9ce commit ea06999
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,11 @@ void ntrip_compat_listener::Ntrip_Decode_Request_cb(bufferevent *bev, void *ctx)
spdlog::warn("[{}:{}]: process error request, from: [ip: {} port: {}] ", __class__, __func__, ip, port);
svr->Process_Unknow_Request(bev, connect_key);
}
catch (std::exception &e)
{
spdlog::warn("[{}:{}]: process error request, from: [ip: {} port: {}] ,what:{}", __class__, __func__, ip, port, e.what());
svr->Process_Unknow_Request(bev, connect_key);
}

// 清理
delete arg; // 删除arg
Expand Down

0 comments on commit ea06999

Please sign in to comment.