fix: Updates getActiveSocket.
This commit is contained in:
parent
eaceca57ac
commit
3ddb19ff2c
@ -119,7 +119,7 @@ public class MergingDatagramSocket
|
|||||||
public void send(DatagramPacket pkt)
|
public void send(DatagramPacket pkt)
|
||||||
throws IOException
|
throws IOException
|
||||||
{
|
{
|
||||||
SocketContainer active = this.active;
|
SocketContainer active = getActiveSocket();
|
||||||
if (active != null)
|
if (active != null)
|
||||||
{
|
{
|
||||||
active.send(pkt);
|
active.send(pkt);
|
||||||
@ -318,13 +318,7 @@ public class MergingDatagramSocket
|
|||||||
*/
|
*/
|
||||||
private SocketContainer getActiveSocket()
|
private SocketContainer getActiveSocket()
|
||||||
{
|
{
|
||||||
//TODO switch dynamically.
|
return this.active;
|
||||||
SocketContainer[] socketContainers = this.socketContainers;
|
|
||||||
if (socketContainers != null && socketContainers.length > 0)
|
|
||||||
{
|
|
||||||
return socketContainers[0];
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user