* Fix indentation in Transactor.kill()

This commit is contained in:
hns 2007-05-03 14:52:14 +00:00
parent 657b86dee5
commit 972bb8f232

View file

@ -413,32 +413,32 @@ public class Transactor extends Thread {
* Kill this transaction thread. Used as last measure only. * Kill this transaction thread. Used as last measure only.
*/ */
public synchronized void kill() { public synchronized void kill() {
killed = true; killed = true;
interrupt(); interrupt();
// Interrupt the thread if it has not noticed the flag (e.g. because it is busy // Interrupt the thread if it has not noticed the flag (e.g. because it is busy
// reading from a network socket). // reading from a network socket).
if (isAlive()) { if (isAlive()) {
interrupt(); interrupt();
try { try {
join(1000); join(1000);
} catch (InterruptedException ir) { } catch (InterruptedException ir) {
// interrupted by other thread // interrupted by other thread
} }
} }
if (isAlive() && "true".equals(nmgr.app.getProperty("requestTimeoutStop"))) { if (isAlive() && "true".equals(nmgr.app.getProperty("requestTimeoutStop"))) {
// still running - check if we ought to stop() it // still running - check if we ought to stop() it
try { try {
Thread.sleep(2000); Thread.sleep(2000);
if (isAlive()) { if (isAlive()) {
// thread is still running, pull emergency break // thread is still running, pull emergency break
nmgr.app.logEvent("Stopping Thread for Transactor " + this); nmgr.app.logEvent("Stopping Thread for Transactor " + this);
stop(); stop();
}
} catch (InterruptedException ir) {
// interrupted by other thread
} }
} catch (InterruptedException ir) {
// interrupted by other thread
}
} }
} }