调整获取监听信息的逻辑
parent
1909c7f71f
commit
afe80a7be1
|
@ -139,12 +139,12 @@ public class SipLayer implements CommandLineRunner {
|
|||
}
|
||||
|
||||
public SipProviderImpl getUdpSipProvider(String ip) {
|
||||
if (ObjectUtils.isEmpty(ip)) {
|
||||
return null;
|
||||
}
|
||||
if (udpSipProviderMap.size() == 1) {
|
||||
return udpSipProviderMap.values().stream().findFirst().get();
|
||||
}
|
||||
if (ObjectUtils.isEmpty(ip)) {
|
||||
return null;
|
||||
}
|
||||
return udpSipProviderMap.get(ip);
|
||||
}
|
||||
|
||||
|
@ -163,12 +163,12 @@ public class SipLayer implements CommandLineRunner {
|
|||
}
|
||||
|
||||
public SipProviderImpl getTcpSipProvider(String ip) {
|
||||
if (ObjectUtils.isEmpty(ip)) {
|
||||
return null;
|
||||
}
|
||||
if (tcpSipProviderMap.size() == 1) {
|
||||
return tcpSipProviderMap.values().stream().findFirst().get();
|
||||
}
|
||||
if (ObjectUtils.isEmpty(ip)) {
|
||||
return null;
|
||||
}
|
||||
return tcpSipProviderMap.get(ip);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue