优先使用ipv4地址

This commit is contained in:
ziyue 2022-05-10 14:48:05 +08:00
parent 45494c020b
commit 9861091b18
2 changed files with 2 additions and 2 deletions

@ -1 +1 @@
Subproject commit 74ddbaa7e7c6995e94062a5ba1c7f0f2adef43f4
Subproject commit 75e6df651421e601714e1ea5892e1d5a1783e7e8

View File

@ -45,7 +45,7 @@ void RtpSender::startSend(const MediaSourceEvent::SendRtpArgs &args, const funct
WorkThreadPool::Instance().getPoller()->async([cb, args, weak_self, poller, local_port]() {
struct sockaddr_storage addr;
//切换线程目的是为了dns解析放在后台线程执行
if (!SockUtil::getDomainIP(args.dst_url.data(), args.dst_port, addr)) {
if (!SockUtil::getDomainIP(args.dst_url.data(), args.dst_port, addr, AF_INET, SOCK_DGRAM, IPPROTO_UDP)) {
poller->async([args, cb, local_port]() {
//切回自己的线程
cb(local_port, SockException(Err_dns, StrPrinter << "dns解析域名失败:" << args.dst_url));