Skip to content

Commit

Permalink
kill waiting thread only if its still alive
Browse files Browse the repository at this point in the history
  • Loading branch information
amitrathore committed Oct 15, 2009
1 parent 2d8969b commit f69d7d2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/org/runa/swarmiji/client/client_core.clj
Expand Up @@ -43,13 +43,14 @@
(let [chan (:channel sevak-proxy) queue (:queue sevak-proxy) thread (:thread sevak-proxy)]
(try
(with-swarmiji-bindings
(log-message "Force disconnecting!")
(.queueDelete chan queue)
(catch Exception e))
;no-op, this sevak-proxy should be aborted, thats it
(finally
(.interrupt thread)))))

(finally
(if (.isAlive thread)
(do
(log-message "Force interrupt!")
(.interrupt thread)))))))

(defn on-swarm [sevak-service & args]
(log-message "On-swarm!")
Expand Down

0 comments on commit f69d7d2

Please sign in to comment.