Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 4301 Details for
Bug 18321
HP readme: VM option -XdoCloseWithReadPending; Eclipse does not exit after launching Help
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
patch.txt
patch.txt (text/plain), 2.79 KB, created by
Konrad Kolosowski
on 2003-03-21 15:16:51 EST
(
hide
)
Description:
patch.txt
Filename:
MIME Type:
Creator:
Konrad Kolosowski
Created:
2003-03-21 15:16:51 EST
Size:
2.79 KB
patch
obsolete
>Index: TomcatAppServer.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.tomcat/src/org/eclipse/tomcat/internal/TomcatAppServer.java,v >retrieving revision 1.20 >diff -u -r1.20 TomcatAppServer.java >--- TomcatAppServer.java 10 Mar 2003 21:56:20 -0000 1.20 >+++ TomcatAppServer.java 12 Mar 2003 18:46:29 -0000 >@@ -280,7 +280,12 @@ > > // Remove the engine (which should trigger removing the connector) > try { >+ Unblocker unblocker = new Unblocker(hostAddress, port); >+ unblocker.start(); >+ // The next call can sometimes block >+ // until a connection is made to unblock the socket > embedded.removeEngine(engine); >+ unblocker.finish(); > } catch (Exception exc) { > throw new CoreException( > new Status( >Index: Unblocker.java >=================================================================== >RCS file: Unblocker.java >diff -N Unblocker.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ Unblocker.java 12 Mar 2003 18:46:29 -0000 >@@ -0,0 +1,71 @@ >+/******************************************************************************* >+ * Copyright (c) 2000, 2003 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Common Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/cpl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.tomcat.internal; >+ >+import java.io.*; >+import java.net.*; >+ >+/** >+ * Periodically connects to the server >+ * to unblock ServerSocket.close(), that can block >+ * on some systems. >+ */ >+public class Unblocker extends Thread { >+ private final int PERIOD = 500; >+ private String host; >+ private int port; >+ private boolean finishRequested = false; >+ public Unblocker(String host, int port) { >+ super(); >+ this.host = host; >+ this.port = port; >+ this.setName("Tomcat Unblocker"); >+ super.setDaemon(true); >+ } >+ >+ public void run() { >+ // server not started >+ if (host == null || host.length() == 0 || port == 0) { >+ return; >+ } >+ >+ while (!finishRequested) { >+ try { >+ Thread.sleep(PERIOD); >+ } catch (InterruptedException ie) { >+ } >+ if (finishRequested) { >+ break; >+ } >+ >+ Socket socket = null; >+ try { >+ socket = new Socket(host, port); >+ } catch (IOException e) { >+ // server closed; >+ return; >+ } finally { >+ if (socket != null) { >+ try { >+ socket.close(); >+ } catch (IOException ioe) { >+ } >+ } >+ socket = null; >+ } >+ } >+ >+ } >+ >+ public void finish() { >+ finishRequested = true; >+ } >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 18321
:
1280
| 4301