aboutsummaryrefslogtreecommitdiffstats
path: root/AndroidAsync
diff options
context:
space:
mode:
authorKoushik Dutta <koushd@gmail.com>2014-09-17 10:18:35 -0700
committerKoushik Dutta <koushd@gmail.com>2014-09-17 10:18:35 -0700
commit0f0cdf011febb97bacde87771c452b9cf757bcce (patch)
tree1301889fe424b4ae2398c9d7e330e527793a6afa /AndroidAsync
parentad6334981d2b32d5877d6de2200e937865d2a2d1 (diff)
downloadAndroidAsync-0f0cdf011febb97bacde87771c452b9cf757bcce.tar.gz
AndroidAsync-0f0cdf011febb97bacde87771c452b9cf757bcce.tar.bz2
AndroidAsync-0f0cdf011febb97bacde87771c452b9cf757bcce.zip
fix https://github.com/koush/AndroidAsync/issues/244
Diffstat (limited to 'AndroidAsync')
-rw-r--r--AndroidAsync/src/com/koushikdutta/async/AsyncServer.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/AndroidAsync/src/com/koushikdutta/async/AsyncServer.java b/AndroidAsync/src/com/koushikdutta/async/AsyncServer.java
index 6488dcc..4503964 100644
--- a/AndroidAsync/src/com/koushikdutta/async/AsyncServer.java
+++ b/AndroidAsync/src/com/koushikdutta/async/AsyncServer.java
@@ -587,7 +587,12 @@ public class AsyncServer {
}
catch (AsyncSelectorException e) {
Log.e(LOGTAG, "Selector exception", e);
- StreamUtility.closeQuietly(selector.getSelector());
+ try {
+ // StreamUtility.closeQuiety is throwing ArrayStoreException?
+ selector.getSelector().close();
+ }
+ catch (Exception ex) {
+ }
}
return;
}
@@ -610,7 +615,12 @@ public class AsyncServer {
}
catch (AsyncSelectorException e) {
Log.e(LOGTAG, "Selector exception", e);
- StreamUtility.closeQuietly(selector.getSelector());
+ try {
+ // StreamUtility.closeQuiety is throwing ArrayStoreException?
+ selector.getSelector().close();
+ }
+ catch (Exception ex) {
+ }
}
// see if we keep looping, this must be in a synchronized block since the queue is accessed.
synchronized (server) {