[kaffe] CVS kaffe (kaz): libraries/javalib/java/net/ServerSocket.java
Kaffe CVS
Kaffe Mailing List <kaffe@kaffe.org>
Wed Mar 17 15:01:01 2004
PatchSet 4535
Date: 2004/03/17 22:42:07
Author: kaz
Branch: HEAD
Tag: (none)
Log:
2004-03-17 Ito Kazumitsu <kaz@maczuka.gcd.org>
* libraries/javalib/java/net/ServerSocket.java
(accept): Close the socket when error occured.
Members:
ChangeLog:1.2113->1.2114
libraries/javalib/java/net/ServerSocket.java:1.23->1.24
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2113 kaffe/ChangeLog:1.2114
--- kaffe/ChangeLog:1.2113 Wed Mar 17 20:23:06 2004
+++ kaffe/ChangeLog Wed Mar 17 22:42:07 2004
@@ -1,3 +1,8 @@
+2004-03-17 Ito Kazumitsu <kaz@maczuka.gcd.org>
+
+ * libraries/javalib/java/net/ServerSocket.java
+ (accept): Close the socket when error occured.
+
2004-03-17 Dalibor Topic <robilad@kaffe.org>
* libraries/javalib/java/util/regex/Matcher.java,
Index: kaffe/libraries/javalib/java/net/ServerSocket.java
diff -u kaffe/libraries/javalib/java/net/ServerSocket.java:1.23 kaffe/libraries/javalib/java/net/ServerSocket.java:1.24
--- kaffe/libraries/javalib/java/net/ServerSocket.java:1.23 Tue Feb 24 17:53:28 2004
+++ kaffe/libraries/javalib/java/net/ServerSocket.java Wed Mar 17 22:42:09 2004
@@ -323,7 +323,21 @@
sm.checkListen (impl.getLocalPort ());
Socket socket = new Socket();
- implAccept (socket);
+ try
+ {
+ implAccept (socket);
+ }
+ catch (IOException e)
+ {
+ try
+ {
+ socket.close ();
+ }
+ catch (IOException e)
+ {
+ }
+ throw e;
+ }
return socket;
}