0

I have a webservice using RemObjects and a TROIndyHTTPServer using Delphi XE. I don't know how to close manually the application without generate an access violation when the clients are executing webservice operations. I don't know how to abort the threads of the webservice that are executing the operations. If I close the application sometimes the exe remains indefinitely executing and generates an access violation.

Thanks for the help

Plebios
  • 835
  • 1
  • 7
  • 17
  • What you need to do is implement mechanizm which will detect when application is trying to close and stop the webserivce operations prior closing of application. How exactly do you achieve this depends on your current code. I gues that you have some kind of a loop in your application. If it is so then create a global bloan variable like IsClosing and check its status for every cycle in your loop. But form more extensive help I'm afraid you will have to show us some of your code. – SilverWarior Sep 19 '14 at 09:55
  • @SilverWarrior checking for a shutdown flag might help in some cases, but if the flag is set after the long-running operation started it will not be detected anymore – mjn Sep 19 '14 at 10:38

1 Answers1

0

The Indy HTTP/TCP server (normally) allows clients to complete their current request when the server shuts down (by setting Active := False).

If long-running requests cause this problem, it should be possible to reproduce it and use the debugger to analyze the AV further.

mjn
  • 36,362
  • 28
  • 176
  • 378