2014-04-25 3:39 GMT-03:00 Michael Van Canneyt <mich...@freepascal.org>: [...] > > Damn windows returning 0 on read... Can you please test with the following > change: > > > Procedure FillBuffer; > > Var > R : Integer; > > begin > SetLength(FBuffer,ReadBufLen); > Repeat > r:=FSocket.Read(FBuffer[1],ReadBufLen); > > If r<0 then > Raise EHTTPServer.Create(SErrReadingSocket); > if R=0 then > Sleep(10); > Until (R<>0); > if (R<ReadBuflen) then > SetLength(FBuffer,r); > end;
After apply this change, now when read returns 0, it freezes the app., because the "sleep(10)" command is infinitely called. :/ Damn windows! -- Silvio Clécio My public projects - github.com/silvioprog
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal