<div dir="ltr">Hello,<div><br></div><div>A friend from Brazil found a small problem in "resolve" unit.</div><div><br></div><div>Before execute the test:</div><div><br></div><div><a href="http://imagebin.org/256886">http://imagebin.org/256886</a><br>

</div><div><br></div><div>
After execute the test:</div><div><br></div><div><a href="http://imagebin.org/256887">http://imagebin.org/256887</a><br></div><div><br></div><div>And the test is:</div><div><br></div><div><div style="font-family:arial,sans-serif;font-size:13px">

procedure TForm1.Button1Click(Sender : TObject);</div>
<div style="font-family:arial,sans-serif;font-size:13px">begin</div><div style="font-family:arial,sans-serif;font-size:13px">  with TInetSocket.Create('<a href="http://www.google.com" target="_blank">www.google.com</a>', 80) do</div>


<div style="font-family:arial,sans-serif;font-size:13px">  try</div><div style="font-family:arial,sans-serif;font-size:13px">  finally</div><div style="font-family:arial,sans-serif;font-size:13px">    Free;</div><div style="font-family:arial,sans-serif;font-size:13px">


  end;</div><div style="font-family:arial,sans-serif;font-size:13px">end;</div><div><br></div><div>After debug the TInetSocket class, the problem continues in:</div><div><br></div><div><span style="font-family:arial,sans-serif;font-size:13px">procedure TForm1.Button1Click(Sender : TObject);</span><br>

</div><div style><span style="font-family:arial,sans-serif;font-size:13px">begin</span></div><div><div style="font-family:arial,sans-serif;font-size:13px">
 with THostResolver.Create(nil) do</div><div style="font-family:arial,sans-serif;font-size:13px">  try</div><div style="font-family:arial,sans-serif;font-size:13px">    if not NameLookup('<a href="http://www.google.com" target="_blank">www.google.com</a>') then</div>


<div style="font-family:arial,sans-serif;font-size:13px">      raise Exception.Create('não resolvido');</div><div style="font-family:arial,sans-serif;font-size:13px">  finally</div><div style="font-family:arial,sans-serif;font-size:13px">


    Free;</div><div style="font-family:arial,sans-serif;font-size:13px">  end;</div><div style="font-family:arial,sans-serif;font-size:13px">end; </div></div><div><br></div><div>And finally, you can reproduce it with:</div>

<div><br></div><div><div>uses</div><div>  resolve, winsock;</div>
<div><br></div><div>procedure TForm1.Button1Click(Sender: TObject);</div><div>var</div><div>  FHostEntry: PHostEnt;</div><div>begin</div><div>  FHostEntry := gethostbyname('<a href="http://www.google.com.br" target="_blank">www.google.com.br</a>');</div>


<div>end;</div></div><div><br></div><div>But, if in code above I undeclare the "resolve" unit, I got only one thread (threads = 1).</div><div><br></div><div>Is this a bug?</div><div><br></div><div>Thank you!</div>


<div><br></div>-- <br>Silvio Clécio<br>My public projects - <a href="http://github.com/silvioprog" target="_blank">github.com/silvioprog</a>
</div></div>