HashLoad / horse

Fast, opinionated, minimalist web framework for Delphi
MIT License
1.15k stars 217 forks source link

Will not shup down #343

Open jarroddavis68 opened 1 year ago

jarroddavis68 commented 1 year ago

It runs fine in centos, but when I try to stop the server, it seems to hang in the terminal, and I have to Ctrl+Z to get back to the command line. How do I gracefully shut the server down?

  THorse.Listen(9000,
    procedure
    begin
      WriteLn;
      Write('Press ENTER to stop server...');
      Readln;
      THorse.StopListen;
    end);

What is interesting is that if an endpoint is never called, you can press ENTER and it will terminated as expected. However, call an endpoint and when you press ENTER, the server shutdown as you are not able to access the url anylonger, but the terminal window hangs.

viniciussanchez commented 1 year ago

image