Imported Classpath 0.18.
* sources.am, Makefile.in: Updated. * Makefile.am (nat_source_files): Removed natProxy.cc. * java/lang/reflect/natProxy.cc: Removed. * gnu/classpath/jdwp/VMFrame.java, gnu/classpath/jdwp/VMIdManager.java, gnu/classpath/jdwp/VMVirtualMachine.java, java/lang/reflect/VMProxy.java: New files. 2005-09-23 Thomas Fitzsimmons <fitzsim@redhat.com> * scripts/makemake.tcl (verbose): Add gnu/java/awt/peer/qt to BC list. 2005-09-23 Thomas Fitzsimmons <fitzsim@redhat.com> * gnu/java/net/DefaultContentHandlerFactory.java (getContent): Remove ClasspathToolkit references. 2005-09-23 Thomas Fitzsimmons <fitzsim@redhat.com> * gnu/awt/xlib/XCanvasPeer.java: Add new peer methods. * gnu/awt/xlib/XFramePeer.java: Likewise. * gnu/awt/xlib/XGraphicsConfiguration.java: Likewise. 2005-09-23 Thomas Fitzsimmons <fitzsim@redhat.com> * Makefile.am (libgcjawt_la_SOURCES): Remove jawt.c. Add classpath/native/jawt/jawt.c. * Makefile.in: Regenerate. * jawt.c: Remove file. * include/Makefile.am (tool_include__HEADERS): Remove jawt.h and jawt_md.h. Add ../classpath/include/jawt.h and ../classpath/include/jawt_md.h. * include/Makefile.in: Regenerate. * include/jawt.h: Regenerate. * include/jawt_md.h: Regenerate. From-SVN: r104586
This commit is contained in:
@@ -39,6 +39,7 @@ exception statement from your version. */
|
||||
package gnu.CORBA;
|
||||
|
||||
import java.net.Socket;
|
||||
import java.net.SocketException;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
@@ -70,16 +71,18 @@ public class SocketRepository
|
||||
|
||||
/**
|
||||
* Get a socket.
|
||||
*
|
||||
*
|
||||
* @param key a socket key.
|
||||
*
|
||||
* @return an opened socket for reuse, null if no such
|
||||
* available or it is closed.
|
||||
*
|
||||
* @return an opened socket for reuse, null if no such available or it is
|
||||
* closed.
|
||||
*/
|
||||
public static Socket get_socket(Object key)
|
||||
{
|
||||
Socket s = (Socket) sockets.get(key);
|
||||
if (s != null && s.isClosed())
|
||||
if (s == null)
|
||||
return null;
|
||||
else if (s.isClosed())
|
||||
{
|
||||
sockets.remove(key);
|
||||
return null;
|
||||
@@ -87,6 +90,15 @@ public class SocketRepository
|
||||
else
|
||||
{
|
||||
sockets.remove(key);
|
||||
try
|
||||
{
|
||||
// Set one minute time out that will be changed later.
|
||||
s.setSoTimeout(60*1000);
|
||||
}
|
||||
catch (SocketException e)
|
||||
{
|
||||
s = null;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user