You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
openSuave.Socketsletflush(ctx:HttpContext)=async{match! AsyncSocket.flush(ctx.connection)with| Choice1Of2 cn ->return Some { ctx with connection = cn }|_->return Some ctx //don't care we are shutting down anyways}letshutdown(cts:CancellationTokenSource)(ctx:HttpContext)=async{do cts.Cancel()return Some ctx }lettest(cts:CancellationTokenSource):WebPart =
path "/gracefulExit">=> Successful.OK "Shutdown inititated">=> flush >=> shutdown cts
It wouldn't be so graceful though, other requests being processed will be interrupted. Currently there is no built-in way of doing a truly graceful shutdown.
I'm trying to gracefully exit the webServer with a GET or POST to the the webServer itself.
Is there a way to execute code after a HTTP response has been given to the client to help me do that properly ?
Is there a nicer way to handle shutting down suave server from a CD pipeline ?
The text was updated successfully, but these errors were encountered: