mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-03-11 17:58:01 +01: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
1 changed files with 3 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue