You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/10/04 19:19:00 UTC

[jira] [Commented] (ARTEMIS-3964) Windows ping IPv4/6 commands have wrong time unit

    [ https://issues.apache.org/jira/browse/ARTEMIS-3964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17612753#comment-17612753 ] 

ASF subversion and git services commented on ARTEMIS-3964:
----------------------------------------------------------

Commit 3a1ec7f155181d4c2eeb6e13c96060b0be1f8b41 in activemq-artemis's branch refs/heads/2.21.0.jbossorg-x from Domenico Francesco Bruscino
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=3a1ec7f155 ]

ARTEMIS-3964 Fix default ping commands timeout for Windows

The ping command on Windows uses -w timeout in milliseconds.

(cherry picked from commit 90966ccdf1704aad12df913c7e18fd9e5846166a)

downstream: ENTMQBR-7072

> Windows ping IPv4/6 commands have wrong time unit
> -------------------------------------------------
>
>                 Key: ARTEMIS-3964
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3964
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>            Reporter: Domenico Francesco Bruscino
>            Assignee: Domenico Francesco Bruscino
>            Priority: Major
>             Fix For: 2.26.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> The ping command on Windows uses
> -w timeout Timeout in milliseconds to wait for each reply. while in code is used seconds.
> {code:java}
> String IPV6_DEFAULT_COMMAND = Env.isWindowsOs() ? "ping -n 1 -w %d %s" : 
> ....
> // default int networkTimeout = 1000;
>  long timeout = Math.max(1, TimeUnit.MILLISECONDS.toSeconds(networkTimeout));
> ...
> processBuilder = buildProcess(ipv6Command, timeout, address.getCanonicalHostName()
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)