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 > > To add to the previours information: I used this loop for an HTTP-server that is built similar to the synapse httpserv demo. The loop in question can be found in http.pas. The method is TTCPHttpThrd.Execute.
------------------------------------------------------------------------- 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
