mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 04:31:37 +08:00
优先使用ipv4地址
This commit is contained in:
parent
45494c020b
commit
9861091b18
@ -1 +1 @@
|
|||||||
Subproject commit 74ddbaa7e7c6995e94062a5ba1c7f0f2adef43f4
|
Subproject commit 75e6df651421e601714e1ea5892e1d5a1783e7e8
|
@ -45,7 +45,7 @@ void RtpSender::startSend(const MediaSourceEvent::SendRtpArgs &args, const funct
|
|||||||
WorkThreadPool::Instance().getPoller()->async([cb, args, weak_self, poller, local_port]() {
|
WorkThreadPool::Instance().getPoller()->async([cb, args, weak_self, poller, local_port]() {
|
||||||
struct sockaddr_storage addr;
|
struct sockaddr_storage addr;
|
||||||
//切换线程目的是为了dns解析放在后台线程执行
|
//切换线程目的是为了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]() {
|
poller->async([args, cb, local_port]() {
|
||||||
//切回自己的线程
|
//切回自己的线程
|
||||||
cb(local_port, SockException(Err_dns, StrPrinter << "dns解析域名失败:" << args.dst_url));
|
cb(local_port, SockException(Err_dns, StrPrinter << "dns解析域名失败:" << args.dst_url));
|
||||||
|
Loading…
Reference in New Issue
Block a user