Board index » delphi » Indy Telnet occasionally hangs...

Indy Telnet occasionally hangs...

I am using Indy to telnet to port 25 for a list of servers.

However, the TIdTelnet component sometimes hangs.

Here's what I do

 for list of servers
  get server name
  try
   connect to server in 5 secs, eg Telnet.Connect(5000);
   readln(5000)
   disconnect
  except
  end
 end

Now, the part that Indy hangs is at Readln. I set ReceiveTimeout to
5000, so theoretically, if it doesn't receive anything in 5 secs, it
should return. But, sometimes, it doesn't return after a few minutes.

Can anyone help me figure out why the Telnet component is{*word*154}, or
how I can work around this?

 

Re:Indy Telnet occasionally hangs...


Ensure you have the latest version of Indy.

There was a problem in ReadLn with a timeout that has been fixed

Quote
"Chee Wee" <chuacw@don'tspammerightsecurity.biz> wrote in message

news:8iak8vg2bvsr3ak53ukee3mhil9lputa5a@4ax.com...
Quote
> I am using Indy to telnet to port 25 for a list of servers.

> However, the TIdTelnet component sometimes hangs.

> Here's what I do

>  for list of servers
>   get server name
>   try
>    connect to server in 5 secs, eg Telnet.Connect(5000);
>    readln(5000)
>    disconnect
>   except
>   end
>  end

> Now, the part that Indy hangs is at Readln. I set ReceiveTimeout to
> 5000, so theoretically, if it doesn't receive anything in 5 secs, it
> should return. But, sometimes, it doesn't return after a few minutes.

> Can anyone help me figure out why the Telnet component is{*word*154}, or
> how I can work around this?

Other Threads