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:
parent
a0d72294a0
commit
9f6f630dfb
@ -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.
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user