Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-7072

Windows ping IPv4/6 commands have wrong time unit

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Undefined
    • AMQ 7.10.1.GA
    • None
    • broker-core

    Description

      While we were looking at ENTMQBR-6719 with Domenico we figured out, that ping command on Windows uses
      -w timeout Timeout in milliseconds to wait for each reply. while in code is used seconds.

      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()
      

      Attachments

        Issue Links

          Activity

            People

              dbruscin Domenico Francesco Bruscino
              mtoth@redhat.com Michal Toth
              Michal Toth Michal Toth
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: