提交 21f43c33 编写于 作者: C chegar

7099488: TwoStacksPlainSocketImpl should invoke super.create(stream), typo in fix for 7098719

Reviewed-by: coffeys
上级 13401fbd
......@@ -71,7 +71,7 @@ abstract class AbstractPlainSocketImpl extends SocketImpl
/* whether this Socket is a stream (TCP) socket or not (UDP)
*/
private boolean stream;
protected boolean stream;
/**
* Load net library into runtime.
......
......@@ -26,6 +26,7 @@ package java.net;
import java.io.IOException;
import java.io.FileDescriptor;
import sun.net.ResourceManager;
/*
* This class defines the plain SocketImpl that is used for all
......@@ -82,7 +83,7 @@ class TwoStacksPlainSocketImpl extends AbstractPlainSocketImpl
protected synchronized void create(boolean stream) throws IOException {
fd1 = new FileDescriptor();
try {
super.create();
super.create(stream);
} catch (IOException e) {
fd1 = null;
throw e;
......@@ -125,6 +126,9 @@ class TwoStacksPlainSocketImpl extends AbstractPlainSocketImpl
protected void close() throws IOException {
synchronized(fdLock) {
if (fd != null || fd1 != null) {
if (!stream) {
ResourceManager.afterUdpClose();
}
if (fdUseCount == 0) {
if (closePending) {
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册