mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-04 20:11:35 +08:00
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:
parent
bdf11d5567
commit
de205e06ba
libjava
@ -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.
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user