- Code: Select all Expand view RUN
- oConn:=TWebClient():New()
oConn:oSocket:lDebug :=.t.
oConn:oSocket:cLogFile:=cLog
oConn:bOnConnect := { | oS | oS:GetPage(cPage) }
oConn:bOnRead := { | cD, oS | cBuffer+=cD }
oConn:oSocket:bClose:= { | oS | ManageFile(cFile) }
oConn:Connect( cSite )
If cSite is down I've noticed that the log file growns very fast, reaching hundreds of Mb in a few minutes, full of lines as follows:
- Code: Select all Expand view RUN
- 09/24/2009 15:02:56: Sent: -1 Len: 112 Buffer Len: 0 Error: 10057
I've tracked down the problem in tSocket.prg, method SendData():
- Code: Select all Expand view RUN
- if nSent != -1
cData = SubStr( cData, nSent + 1 )
nLen = Len( cData )
else
if WSAGetLastError() != WSAEWOULDBLOCK
// exit
endif
endif
SysRefresh()
The Exit was not commented in previous FWH versions (I've checked 7.09), and uncommenting it the problem get solved.
Was it a mistake, and my solution is ok, or is there a reason for commenting that line ?
Thanks,
Davide
FWH 9.05 - xH 1.2.1