bitcoin core: error message is still returned after transaction was transmitted


I use bitcoinj to create the following method to transmit a raw transaction on testnet, and I saw in bitcoin explorer that it has been transmitted. But even the transaction has already been transmitted, it always returns false message, please help me solve this problem, I don't know if there is a problem syncing with the peer or if my transmission method is wrong.

//sync with the peer
static WalletAppKit kit = new WalletAppKit(params, new File("."), "sendrequest-example");
kit.startAsync();
kit.awaitRunning();

//transaction broadcast method
public static boolean broadcastTransaction (Transaction tx) {
        System.out.println("Broadcast transaction: ");
        System.out.println(tx);
        try {
            TransactionBroadcast broadcast = kit.peerGroup().broadcastTransaction(tx);
            broadcast.future().get(20,TimeUnit.SECONDS);
            System.out.println(tx.getHash() + "broadcasted successfully!");
            return true;
        } catch (Exception e) {
            System.out.println("e.getMessage() = " + e.getMessage());
        }
        return false;
    }

The false message is always as follows, even though the transaction has been transmitted.

e.getMessage() = Waited 20 seconds (plus 1985971 nanoseconds delay) for com.google.common.util.concurrent.SettableFuture@20d525(status=PENDING)