diff options
author | David Barksdale <amatus.amongus@gmail.com> | 2011-06-15 20:26:25 -0500 |
---|---|---|
committer | David Barksdale <amatus.amongus@gmail.com> | 2011-06-15 20:26:25 -0500 |
commit | 8dbeddfc88ab0eeeecab558885e2a641021fa51a (patch) | |
tree | 1e14d0a6be9e5cd86af13b9e73c1f5788bbf2141 /src | |
parent | 4089a1c93a4e941c58d9c55f25abc0fc2045c2d1 (diff) |
Catch CancelledKeyException.
Diffstat (limited to 'src')
-rw-r--r-- | src/main/clojure/org/gnu/clojure/gnunet/tcp.clj | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/clojure/org/gnu/clojure/gnunet/tcp.clj b/src/main/clojure/org/gnu/clojure/gnunet/tcp.clj index 430dad8..1246c6e 100644 --- a/src/main/clojure/org/gnu/clojure/gnunet/tcp.clj +++ b/src/main/clojure/org/gnu/clojure/gnunet/tcp.clj @@ -45,13 +45,16 @@ (defn update-selection-key-async! ([peer selection-key ops] (.add (:selector-continuations-queue peer) - #(.interestOps selection-key ops)) + #(try + (.interestOps selection-key ops) + (catch Exception e))) (.wakeup (:selector peer))) ([peer selection-key ops attachment] (.add (:selector-continuations-queue peer) - #(do + #(try (.interestOps selection-key ops) - (.attach selection-key attachment))) + (.attach selection-key attachment) + (catch Exception e))) (.wakeup (:selector peer)))) (defn admit-tcp-message! |