If the user is pressing F5, then the browser will kill the previous connections. Your code should eventually notice that the Socket has been closed (LastError <> 0) or will timeout after xx seconds.
Not sure where the problem is, but it will likely help if you post more code. On 29/01/07, Deborah <[EMAIL PROTECTED]> wrote: > Deborah schrieb: > > Hello, > > > > i have a problem using Synapse with free pascal. > > > > To send a header i use a loop in a thread like: > > for n := 0 to Headers.Count - 1 do begin > > Fsock.SendString(headers[n] + CRLF); > > end; > > > > Headers is TStringlist containing the header. > > > > This loop works in general fine except in case the F5 button is pressed > > several times. > > > > To show a webpage are, let's say, 5 threads needed. If one presses the > > F5 button once, all the 5 threads are passed fine. But in case the F5 > > button is pressed several time, the first thread is started several > > times too. The problem is, that only the last of these first threads > > passes the loop and finishes the thread.All the others got stuck in the > > SendString method. > > I tried using exception handling, added a FSock.CanWrite(1000) before > > the loop and set an FSock.Timeout(5000) in the Create method of the > > thread but unfortunately nothing helped yet. > > > > Deborah > > > > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ synalist-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/synalist-public
