Hello,

A friend from Brazil found a small problem in "resolve" unit.

Before execute the test:

http://imagebin.org/256886

After execute the test:

http://imagebin.org/256887

And the test is:

procedure TForm1.Button1Click(Sender : TObject);
begin
  with TInetSocket.Create('www.google.com', 80) do
  try
  finally
    Free;
  end;
end;

After debug the TInetSocket class, the problem continues in:

procedure TForm1.Button1Click(Sender : TObject);
begin
 with THostResolver.Create(nil) do
  try
    if not NameLookup('www.google.com') then
      raise Exception.Create('não resolvido');
  finally
    Free;
  end;
end;

And finally, you can reproduce it with:

uses
  resolve, winsock;

procedure TForm1.Button1Click(Sender: TObject);
var
  FHostEntry: PHostEnt;
begin
  FHostEntry := gethostbyname('www.google.com.br');
end;

But, if in code above I undeclare the "resolve" unit, I got only one thread
(threads = 1).

Is this a bug?

Thank you!

-- 
Silvio Clécio
My public projects - github.com/silvioprog
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to