Bruce Axtens Active Member Licensed User Longtime User Feb 2, 2016 #1 Code: Copy restServer.AddHandler("/epoxy/shutdown", "EpoxyShutdown", False) ... Sub Handle(req As ServletRequest, resp As ServletResponse) resp.Write("OK") Log("Shutting down.") ExitApplication2(0) End Sub When I send a GET to localhost:8888/epoxy/shutdown the connection hangs and times out. And I don't see the "OK" in the stream back from the server either. The following is from my JScript CLI tool Code: Copy f = new Http("http://localhost:8888/epoxy/shutdown") f.setVerb("GET").openConnection().sendTraffic().result() -> false,-2147483638,The data necessary to complete this operation is not yet available. [http://localhost:12345/epoxy/shutdown],, Is there a more graceful way of shutting down the server?
Code: Copy restServer.AddHandler("/epoxy/shutdown", "EpoxyShutdown", False) ... Sub Handle(req As ServletRequest, resp As ServletResponse) resp.Write("OK") Log("Shutting down.") ExitApplication2(0) End Sub When I send a GET to localhost:8888/epoxy/shutdown the connection hangs and times out. And I don't see the "OK" in the stream back from the server either. The following is from my JScript CLI tool Code: Copy f = new Http("http://localhost:8888/epoxy/shutdown") f.setVerb("GET").openConnection().sendTraffic().result() -> false,-2147483638,The data necessary to complete this operation is not yet available. [http://localhost:12345/epoxy/shutdown],, Is there a more graceful way of shutting down the server?
Erel B4X founder Staff member Licensed User Longtime User Feb 2, 2016 #2 Use CallSubPlus to run a sub that kills the server after 100ms. Upvote 0
Bruce Axtens Active Member Licensed User Longtime User Feb 3, 2016 #3 Works at treat. Thank you. Upvote 0