Skip to content

Commit 0f0cdf0

Browse files
committed
fix koush#244
1 parent ad63349 commit 0f0cdf0

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

AndroidAsync/src/com/koushikdutta/async/AsyncServer.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,12 @@ public void run() {
587587
}
588588
catch (AsyncSelectorException e) {
589589
Log.e(LOGTAG, "Selector exception", e);
590-
StreamUtility.closeQuietly(selector.getSelector());
590+
try {
591+
// StreamUtility.closeQuiety is throwing ArrayStoreException?
592+
selector.getSelector().close();
593+
}
594+
catch (Exception ex) {
595+
}
591596
}
592597
return;
593598
}
@@ -610,7 +615,12 @@ private static void run(final AsyncServer server, final SelectorWrapper selector
610615
}
611616
catch (AsyncSelectorException e) {
612617
Log.e(LOGTAG, "Selector exception", e);
613-
StreamUtility.closeQuietly(selector.getSelector());
618+
try {
619+
// StreamUtility.closeQuiety is throwing ArrayStoreException?
620+
selector.getSelector().close();
621+
}
622+
catch (Exception ex) {
623+
}
614624
}
615625
// see if we keep looping, this must be in a synchronized block since the queue is accessed.
616626
synchronized (server) {

0 commit comments

Comments
 (0)