gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r616164 - /gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/restlets/Stop.java
Date Tue, 29 Jan 2008 05:04:30 GMT
Author: bodewig
Date: Mon Jan 28 21:04:30 2008
New Revision: 616164

URL: http://svn.apache.org/viewvc?rev=616164&view=rev
Log:
make sure System.exit is called even if stop() hangs

Modified:
    gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/restlets/Stop.java

Modified: gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/restlets/Stop.java
URL: http://svn.apache.org/viewvc/gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/restlets/Stop.java?rev=616164&r1=616163&r2=616164&view=diff
==============================================================================
--- gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/restlets/Stop.java (original)
+++ gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/restlets/Stop.java Mon Jan 28
21:04:30 2008
@@ -44,21 +44,20 @@
 
     @Override
     public void handle(Request request, Response response) {
-        final Timer t = new Timer(true);
-        t.schedule(new TimerTask() {
+        new Timer(true).schedule(new TimerTask() {
                 @Override
                 public void run() {
+                    new Timer(true).schedule(new TimerTask() {
+                            @Override
+                                public void run() {
+                                System.exit(0);
+                            }
+                        }, 1000);
                     try {
                         comp.stop();
                     } catch (Exception e) {
                         log.log(Level.WARNING, "failed to stop Jetty", e);
                     }
-                    t.schedule(new TimerTask() {
-                            @Override
-                            public void run() {
-                                System.exit(0);
-                            }
-                        }, 1000);
                 }
             }, 1000);
     }



Mime
View raw message