@@ -296,6 +296,18 @@ getGracefulShutdownTimeout = settingsGracefulShutdownTimeout
296296-- void $ 'System.Posix.Signals.installHandler' 'System.Posix.Signals.sigTERM' ('System.Posix.Signals.Catch' $ shutdownAction >> closeSocket) 'Nothing'
297297-- @
298298--
299+-- Note that by default, the graceful shutdown mode lasts indefinitely
300+-- (see 'setGracefulShutdownTimeout'). If you install a signal handler as above,
301+-- upon receiving that signal, the custon shutdown action will run /and/ all
302+-- outstanding requests will be handled.
303+--
304+-- You may instead prefer to do one or both of the following:
305+--
306+-- * Only wait a finite amount of time for outstanding requests to complete,
307+-- using 'setGracefulShutdownTimeout'.
308+-- * Only catch one signal, so the second hard-kills the Warp server, using
309+-- 'System.Posix.Signals.CatchOnce'.
310+--
299311-- Default: does not install any code.
300312--
301313-- Since 3.0.1
@@ -409,6 +421,10 @@ setServerPushLogger lgr y = y { settingsServerPushLogger = lgr }
409421-- wait indefinitely, and a number, if provided, will be treated as seconds
410422-- to wait for requests to finish, before shutting down the server entirely.
411423--
424+-- Graceful shutdown mode is entered when the server socket is closed; see
425+-- 'setInstallShutdownHandler' for an example of how this could be done in
426+-- response to a UNIX signal.
427+--
412428-- Since 3.2.8
413429setGracefulShutdownTimeout :: Maybe Int
414430 -> Settings -> Settings