7073491: -Dsun.net.maxDatagramSockets=1 does not work correctly with system.gc()
Reviewed-by: ngmr
--- a/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java Mon Sep 05 08:04:04 2011 -0700
+++ b/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java Thu Sep 15 13:50:30 2011 +0100
@@ -66,8 +66,8 @@
* Creates a datagram socket
*/
protected synchronized void create() throws SocketException {
+ ResourceManager.beforeUdpCreate();
fd = new FileDescriptor();
- ResourceManager.beforeUdpCreate();
try {
datagramSocketCreate();
} catch (SocketException ioe) {