One cause for Indy hangs found

Giganews Newsgroups
Subject: One cause for Indy hangs found
Posted by:  Tobias Giesen (tobi…@tgtools.de)
Date: Tue, 23 Aug 2005

Hi,

I found a place where Indy 10 (latest build) can hang, due to a mistake in
the sources.

In "procedure TIdTCPConnection.GetInternalResponse"

we will find this source code line:
      LLine := IOHandler.ReadLn;

Which calls ReadLn with the default parameter
AFailCount: Integer = MaxInt

and this can and will obviously cause hangs.

Any recommendations for better AFailCount ?

Cheers,
Tobias

Replies