made close call safe

This commit is contained in:
Marc Zwart 2018-03-29 13:53:59 +02:00
parent 7d7cd64b1e
commit a7ffaafcb0

View file

@ -1,5 +1,7 @@
package org.mage.card.arcane;
import mage.util.StreamUtils;
import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
@ -42,7 +44,7 @@ public final class Util {
socket = new DatagramSocket();
broadcast(socket, data, port, NetworkInterface.getNetworkInterfaces());
} finally {
socket.close();
StreamUtils.closeQuietly(socket);
}
}