Uploaded image for project: 'Erlang/OTP'
  1. Erlang/OTP
  2. ERL-317

resolver cannot start first secoonds

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 18.3.4.2
    • Fix Version/s: 19.0
    • Component/s: None
    • Labels:
      None

      Description

      Call inet_res:nslookup return NXDOMAIN for first five second when program called from shell.

      [root@myhost test]# cat test.erl 
      -module(test).
      -export([lookup/0, lookup_wait/0]).
       
      lookup() ->
          io:format("Called lookup~n"),
          Result = inet_res:nslookup('example.org',in,a),
          io:format("Finished lookup. Result: ~p~n", [Result]).
       
      lookup_wait() ->
          timer:sleep(5000),
          io:format("Called lookup_wait~n"),
          Result = inet_res:nslookup('example.org',in,a),
          io:format("Finished lookup_wait. Result: ~p~n", [Result]).

      If I executes command erl -noshell -run test lookup then i got NXDOMAIN
      If I execute erl -noshell -run test lookup_wait then call correctly resolv DNS name.

        Activity

        Hide
        raimo Raimo Niskanen added a comment -

        Already fixed in OTP-19.0. See #949.

        Show
        raimo Raimo Niskanen added a comment - Already fixed in OTP-19.0. See #949 .

          People

          • Assignee:
            raimo Raimo Niskanen
            Reporter:
            safarov Sergey Safarov
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development