Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Feb : TIdTCPClient.WriteLn() hangs program

www.cryer.info
Managed Newsgroup Archive

TIdTCPClient.WriteLn() hangs program

Subject:TIdTCPClient.WriteLn() hangs program
Posted by:"Robert" (..@xx.com)
Date:Tue, 5 Feb 2008 23:10:56

Delphi 6, Indy 8.025, Windows XP and 2000

I have a program that runs for days before crashing solid.
Using the following stack trace, it apears to be a Windows problem.

TIdTCPClient.WriteLn('1234567')
TIdTCPConnection.Write('1234567'#$D#$A)
TIdTCPConnection.WriteBuffer((no value),9,False)
DefaultSend
TIdSocketHandle.Send((no value),9,False)
TIdStackWinSock.WSSend(2556,(no value),9,False)

This then calls the MS Windows send() function and the program sits there
forevever.
The system (microcontroller) this is being sent to is completely hung and
requires a power reset. I presume that this is the primary cause of the
problem.
However, the program is supposed to monitor several of these controllers and
should
not stop because one fails.

I understand that Indy is *blocking*, but I don't know how to reset this.

This call sequence is in the main program thread. IdAntiFreeze is being
used.
There are no error code, no exception, just a solid hang. Even WinSight
won't run until
this is cleared.

IdTCPClient.UseNagle = true - I don't know if this matters

Robert Clemenzi

Replies:

www.cryer.info
Managed Newsgroup Archive