2003-12-09 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java (close): Directly return if socket is closed. * java/net/ServerSocket.java (close): Directly return if socket is closed. * java/net/Socket.java (close): Directly return if socket is closed. From-SVN: r74470
This commit is contained in:
parent
25a23f3b26
commit
defd7921fd
4 changed files with 42 additions and 33 deletions
|
@ -353,15 +353,15 @@ public class ServerSocket
|
|||
*/
|
||||
public void close () throws IOException
|
||||
{
|
||||
if (!isClosed())
|
||||
{
|
||||
impl.close();
|
||||
impl = null;
|
||||
bound = false;
|
||||
if (isClosed())
|
||||
return;
|
||||
|
||||
impl.close();
|
||||
impl = null;
|
||||
bound = false;
|
||||
|
||||
if (getChannel() != null)
|
||||
getChannel().close();
|
||||
}
|
||||
if (getChannel() != null)
|
||||
getChannel().close();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue