diff options
author | Koushik Dutta <koushd@gmail.com> | 2014-09-17 10:18:35 -0700 |
---|---|---|
committer | Koushik Dutta <koushd@gmail.com> | 2014-09-17 10:19:23 -0700 |
commit | 62a33257319f92dcdf9fc2028ad4a99ae8451965 (patch) | |
tree | 0d7655e015d2dc20a6f9de33644f38a8d8e584c0 /AndroidAsync | |
parent | f27ca756f9d1c5b02e828195fac46cd8b3c1abb1 (diff) | |
download | AndroidAsync-62a33257319f92dcdf9fc2028ad4a99ae8451965.tar.gz AndroidAsync-62a33257319f92dcdf9fc2028ad4a99ae8451965.tar.bz2 AndroidAsync-62a33257319f92dcdf9fc2028ad4a99ae8451965.zip |
fix https://github.com/koush/AndroidAsync/issues/244
Diffstat (limited to 'AndroidAsync')
-rw-r--r-- | AndroidAsync/src/com/koushikdutta/async/AsyncServer.java | 14 |
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) { |