7073491: -Dsun.net.maxDatagramSockets=1 does not work correctly with system.gc()

Reviewed-by: ngmr
This commit is contained in:
Michael McMahon 2011-09-15 13:50:30 +01:00
parent 59a4dbb95a
commit f9cd96b19b

View File

@ -66,8 +66,8 @@ abstract class AbstractPlainDatagramSocketImpl extends DatagramSocketImpl
* Creates a datagram socket
*/
protected synchronized void create() throws SocketException {
fd = new FileDescriptor();
ResourceManager.beforeUdpCreate();
fd = new FileDescriptor();
try {
datagramSocketCreate();
} catch (SocketException ioe) {