Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Mar : Re: FTP in Thread
| Subject: | Re: FTP in Thread |
| Posted by: | "sham" (shamre..@inspirationmatters.com) |
| Date: | Fri, 31 Mar 2006 19:03:57 |
In fact, putting sleep(0) before the put command also works.
Why ???
"sham" <shamresh@inspirationmatters.com> wrote in message
news:442d524b$1@newsgroups.borland.com...
>
> Hi,
>
> I am using Delphi 7 and indy 9.
>
> In my thread, if I set a break point on the put command, the file is ftp'd
> correctly. When I run the app without the break point, I get a readtimeout
> exception : Stack is :
>
> ntdll.dll
> C:\WINDOWS\System32\mswsock.dll
> C:\WINDOWS\system32\WS2_32.dll
> TIdStackWindows.WSSelect($39FD9E0,nil,nil,-2)
> TIdSocketHandle.Readable(-2)
> TIdIOHandlerSocket.Readable(-2)
> TIdTCPConnection.ReadFromStack(True,-2,True)
> TIdTCPConnection.ReadLn(#$A,-1,16384)
> TIdTCPConnection.ReadLnWait(2147483647)
> TIdTCPConnection.GetInternalResponse
> TIdTCPConnection.GetResponse((...))
> TIdTCPConnection.SendCmd('PORT 127,0,0,1,6,249',(...))
> TIdFTP.SendPort($391D7E0)
> TIdFTP.InternalPut('STOR testFile2.dat-FS=11',$39FCD60,True)
> TIdFTP.Put($39FCD60,'testFile2.dat-FS=11',False)
> TimFTPThread.SendEnvelope
> TimFTPThread.ThreadExecute($3CBD9E0,False)
> TimExecuteMethodThread.DoExecute
> TimThread.Execute
> C:\StarTeam\Inspiration Matters\Inspired Signage\Bin\ComposerWin32.exe
> ThreadProc($3CBD9E0)
> ThreadWrapper($38FEE30)
> C:\StarTeam\Inspiration Matters\Inspired Signage\Bin\ComposerWin32.exe
> C:\StarTeam\Inspiration Matters\Inspired Signage\Bin\ComposerWin32.exe
> C:\WINDOWS\system32\kernel32.dll
>
> The onstatus events give : Start Transferring and then the read time out
> occurs.
>
> If I remove the break point and put a sleep(100) in before the put
> command, it seems to work.
>
> Why is this happening?
>
> Sham.