Thank you Danijel for the detailed post.
But my own post was too much concise.
And the function ReportStatus is the source of confusion.
I would say TService.ReportStatus to be more accurate.
Sorry.
But let me explain my problem.
I wrote a Windows Service (services.msc).
I use SvCom from Aldynsoftware but the situation is the same with the standard Delphi TService VCL (unit SvcMgr.pas).
(your useful RTCWebServer project also use a TService)
Sometimes my Windows Service needs to upload a file to a server.
To upload the file I use a TRtcDataRequest and I call WaitForCompletionEx.
If uploading file takes more than TService.WaitTime I need to call TService.ReportStatus.
Otherwise the operating system thinks and reports that the service is down (I see a service failure in services.msc).
I also got unpredictable results when Windows Shutdown (for example).
Readers who want more information about ReportStatus can read Delphi helpfile or
http://www.aldyn.ru/demos/0002/3.htmlSo finally I just want to know the better strategy to call TService.ReportStatus during upload.
Hope I am more clear.
Please be indulgent with my English or clumsiness.