2004-03-21 Ito Kazumitsu <kaz@maczuka.gcd.org>

* java/net/ServerSocket.java
        (accept): Close the socket when error occured.

From-SVN: r79774
This commit is contained in:
Ito Kazumitsu 2004-03-21 11:00:48 +00:00 committed by Michael Koch
parent bdf11d5567
commit de205e06ba
2 changed files with 23 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2004-03-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/net/ServerSocket.java
(accept): Close the socket when error occured.
2004-03-21 Jeroen Frijters <jeroen@frijters.net>
* java/net/URI.java (parseURI): Added unquoting.

View File

@ -323,7 +323,24 @@ public class ServerSocket
sm.checkListen (impl.getLocalPort ());
Socket socket = new Socket();
implAccept (socket);
try
{
implAccept(socket);
}
catch (IOException e)
{
try
{
socket.close();
}
catch (IOException e2)
{
}
throw e;
}
return socket;
}