diff --git a/.github/workflows/build-gradle.yml b/.github/workflows/build-gradle.yml index e2fd9bd77c3..e1987daac34 100644 --- a/.github/workflows/build-gradle.yml +++ b/.github/workflows/build-gradle.yml @@ -8,7 +8,7 @@ jobs: timeout-minutes: 15 strategy: matrix: - os: [ubuntu-24.04, macOS-15, macOS-15-intel, windows-2022] + os: [ubuntu-24.04, ubuntu-24.04-arm, macOS-15, macOS-15-intel, windows-2022] java: ['17', '21', '25'] distribution: ['temurin'] gradle: ['8.14.4', '9.2.1'] @@ -64,7 +64,7 @@ jobs: timeout-minutes: 15 strategy: matrix: - os: [ubuntu-24.04, macOS-15] + os: [ubuntu-24.04, ubuntu-24.04-arm, macOS-15] java: [ '25' ] distribution: [ 'graalvm-community' ] gradle: ['9.2.1'] diff --git a/core/src/main/java/org/bitcoinj/net/NioServer.java b/core/src/main/java/org/bitcoinj/net/NioServer.java index a3323d20d7b..2ea695696a5 100644 --- a/core/src/main/java/org/bitcoinj/net/NioServer.java +++ b/core/src/main/java/org/bitcoinj/net/NioServer.java @@ -48,6 +48,8 @@ private void handleKey(Selector selector, SelectionKey key) throws IOException { if (key.isValid() && key.isAcceptable()) { // Accept a new connection, give it a stream connection as an attachment SocketChannel newChannel = sc.accept(); + if (newChannel == null) + return; // Spurious wakeup, no pending connection newChannel.configureBlocking(false); SelectionKey newKey = newChannel.register(selector, SelectionKey.OP_READ); try { @@ -82,10 +84,15 @@ public NioServer(final StreamConnectionFactory connectionFactory, InetSocketAddr this.connectionFactory = connectionFactory; sc = ServerSocketChannel.open(); - sc.configureBlocking(false); - sc.socket().bind(bindAddress); - selector = SelectorProvider.provider().openSelector(); - sc.register(selector, SelectionKey.OP_ACCEPT); + try { + sc.configureBlocking(false); + sc.socket().bind(bindAddress); + selector = SelectorProvider.provider().openSelector(); + sc.register(selector, SelectionKey.OP_ACCEPT); + } catch (IOException e) { + sc.close(); + throw e; + } } @Override @@ -102,7 +109,7 @@ protected void run() { handleKey(selector, key); } } - } catch (IOException e) { + } catch (Exception e) { log.error("Error trying to open/read from connection", e); } finally { // Go through and close everything, without letting IOExceptions get in our way diff --git a/wallettemplate/build.gradle b/wallettemplate/build.gradle index c052e1b38e5..ca1052d81fd 100644 --- a/wallettemplate/build.gradle +++ b/wallettemplate/build.gradle @@ -26,7 +26,7 @@ configurations.configureEach { } javafx { - version = '25.0.1' + version = '25.0.2' modules = [ 'javafx.controls', 'javafx.fxml' ] }