X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Fdolda%2Fjsvc%2FThreadContext.java;h=36b01215f3faa74ae38481731a4b746ae1d0ed90;hb=0fc245dfd4f7bb5f5c3ffbdfe0b1df37430ddc1d;hp=d0e32fd67a50ce688601ed540d3fc6a6a9bfa602;hpb=13e578b10b388cc0dea88e05b79265c21416e3a0;p=jsvc.git diff --git a/src/dolda/jsvc/ThreadContext.java b/src/dolda/jsvc/ThreadContext.java index d0e32fd..36b0121 100644 --- a/src/dolda/jsvc/ThreadContext.java +++ b/src/dolda/jsvc/ThreadContext.java @@ -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 { @@ -115,8 +118,8 @@ public class ThreadContext extends ThreadGroup { } public void shutdown() { - if(root instanceof ContextResponder) - ((ContextResponder)root).destroy(); + if(root instanceof Destroyable) + ((Destroyable)root).destroy(); try { long last = 0; while(true) {