3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-07 06:44:16 +00:00

Catch AssertionError when connecting to sockets.

Annoyingly this is thrown on Android when libcore.io.Posix.getsockname() throws libcore.io.ErrnoException, rather than just an IOException.
This commit is contained in:
Andreas Schildbach 2014-09-04 12:33:40 +02:00
parent a0d72294a0
commit 9f6f630dfb

View File

@ -146,6 +146,9 @@ public class NioClientManager extends AbstractExecutionThreadService implements
} catch (IOException e) {
log.error("Could not connect to " + serverAddress);
throw new RuntimeException(e); // This should only happen if we are, eg, out of system resources
} catch (AssertionError e) {
log.error("Could not connect to " + serverAddress);
throw new RuntimeException(e); // Happens on Android when libcore.io.Posix.getsockname() throws libcore.io.ErrnoException.
}
}