You have to call Finish in the contrext of the thread running UrlHandler.Execute, not your worker thread. It is not important that it is in the Execute method, only the thread context matters.

Of course, the browser has a timeout, but much longer than 10 seconds.

The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)

----- Original Message ----- From: "Busai Péter" <>
To: "'ICS support mailing'" <>
Sent: Sunday, January 30, 2011 3:28 PM
Subject: [twsocket] HttpAppServer Finish question


What exactly is it doing?

If  I have to use a worker thread to run long queries, I create thread
in the URLHandler.
Pass connection parameters to thread and prepare answer  in Threads
execute method.
Then send answer in UrlHandler.FinishThread event.
Should I call Finish at end of URLHandler.Execute, or at end of thread
in UrlHandler.FinishThread event?
In later case, in my experience, if thread runs more than 10secs (fx.
calling sleep(11000) in thread),
connection state is changed from wsConnected to wsOpened and I can not
send answer.
The browser shows a blank screen and says ready (Firefox).
Does this timeout has something to do with calling Finish or not?


To unsubscribe or change your settings for TWSocket mailing list
please goto
Visit our website at

Reply via email to