mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-10 23:18:45 +00:00
7099488: TwoStacksPlainSocketImpl should invoke super.create(stream), typo in fix for 7098719
Reviewed-by: coffeys
This commit is contained in:
parent
bbcff1b792
commit
08d82ca044
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user