Honor jsvc.forcelimit.
authorFredrik Tolf <fredrik@dolda2000.com>
Sat, 11 Sep 2010 04:03:50 +0000 (06:03 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Sat, 11 Sep 2010 04:03:50 +0000 (06:03 +0200)
src/dolda/jsvc/ThreadContext.java

index d0e32fd..b6d9677 100644 (file)
@@ -72,7 +72,10 @@ public class ThreadContext extends ThreadGroup {
                if(st.st == "killed")
                    logger.log(Level.WARNING, "Thread " + rt + " refused to die; killing again");
                if(now - st.lastkill > 5000) {
-                   rt.stop();
+                   if(forcelimit)
+                       rt.stop();
+                   else
+                       rt.interrupt();
                    st.st = "killed";
                    st.lastkill = now;
                } else {