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 214657 Details for
Bug 377846
The server timeout timer begins at the incorrect time (port to 3.2.5 patches)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch v1.0
377846_patch_1.0.txt (text/plain), 2.79 KB, created by
Steven Hung
on 2012-04-27 00:10:50 EDT
(
hide
)
Description:
Patch v1.0
Filename:
MIME Type:
Creator:
Steven Hung
Created:
2012-04-27 00:10:50 EDT
Size:
2.79 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.wst.server.core >Index: servercore/org/eclipse/wst/server/core/internal/Server.java >=================================================================== >RCS file: /cvsroot/webtools/servertools/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/Server.java,v >retrieving revision 1.185.2.11.2.2 >diff -u -r1.185.2.11.2.2 Server.java >--- servercore/org/eclipse/wst/server/core/internal/Server.java 9 Feb 2012 23:16:03 -0000 1.185.2.11.2.2 >+++ servercore/org/eclipse/wst/server/core/internal/Server.java 24 Apr 2012 18:13:25 -0000 >@@ -3290,8 +3290,6 @@ > } > } > }; >- thread.setDaemon(true); >- thread.start(); > > if (Trace.FINEST) { > Trace.trace(Trace.STRING_FINEST, "synchronousRestart 2"); >@@ -3300,6 +3298,9 @@ > // call the delegate restart > try { > getBehaviourDelegate(null).restart(launchMode); >+ >+ thread.setDaemon(true); >+ thread.start(); > } catch (CoreException e) { > removeServerListener(listener); > timer.alreadyDone = true; >@@ -3435,8 +3436,6 @@ > } > } > }; >- thread.setDaemon(true); >- thread.start(); > > if (Trace.FINEST) { > Trace.trace(Trace.STRING_FINEST, "synchronousStart 2"); >@@ -3445,9 +3444,11 @@ > // start the server > try { > startImpl2(launchMode, monitor); >+ >+ thread.setDaemon(true); >+ thread.start(); > } catch (CoreException e) { > removeServerListener(listener); >- timer.alreadyDone = true; > return e.getStatus(); > } > if (monitor.isCanceled()) { >@@ -3561,11 +3562,23 @@ > final Timer timer = new Timer(); > > final int serverTimeout = getStopTimeout() * 1000; >+ Thread thread = null; > if (serverTimeout > 0) { >- Thread thread = new Thread("Server Stop Timeout") { >+ thread = new Thread("Server Stop Timeout") { > public void run() { >- try { >- Thread.sleep(serverTimeout); >+ try { >+ int totalTimeout = serverTimeout; >+ if (totalTimeout < 0) >+ totalTimeout = 1; >+ >+ int retryPeriod = 1000; >+ >+ while (totalTimeout > 0 && !timer.alreadyDone){ >+ Thread.sleep(retryPeriod); >+ if (serverTimeout > 0) >+ totalTimeout -= retryPeriod; >+ } >+ > if (!timer.alreadyDone) { > timer.timeout = true; > // notify waiter >@@ -3584,13 +3597,16 @@ > } > } > }; >- thread.setDaemon(true); >- thread.start(); > } > > // stop the server > stopImpl2(force); > >+ if (thread != null){ >+ thread.setDaemon(true); >+ thread.start(); >+ } >+ > // wait for it! wait for it! > synchronized (mutex) { > try { >@@ -3603,6 +3619,7 @@ > "Error waiting for server stop", e); > } > } >+ timer.alreadyDone = true; > } > removeServerListener(listener); >
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 377846
: 214657