SIP只有一个监听时,直接返回
parent
70e6d919e9
commit
07a8ef9e25
|
@ -142,6 +142,9 @@ public class SipLayer implements CommandLineRunner {
|
||||||
if (ObjectUtils.isEmpty(ip)) {
|
if (ObjectUtils.isEmpty(ip)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
if (udpSipProviderMap.size() == 1) {
|
||||||
|
return udpSipProviderMap.values().stream().findFirst().get();
|
||||||
|
}
|
||||||
return udpSipProviderMap.get(ip);
|
return udpSipProviderMap.get(ip);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,6 +166,9 @@ public class SipLayer implements CommandLineRunner {
|
||||||
if (ObjectUtils.isEmpty(ip)) {
|
if (ObjectUtils.isEmpty(ip)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
if (tcpSipProviderMap.size() == 1) {
|
||||||
|
return tcpSipProviderMap.values().stream().findFirst().get();
|
||||||
|
}
|
||||||
return tcpSipProviderMap.get(ip);
|
return tcpSipProviderMap.get(ip);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue