Page Contents

Home > @loopback/http-server > BaseHttpOptions > gracePeriodForClose

BaseHttpOptions.gracePeriodForClose property

The gracePeriodForClose property controls how to stop the server gracefully. Its value is the number of milliseconds to wait before in-flight requests finish when the server is being stopped. With this setting, we also reject new requests from existing keep-alive connections in addition to stopping accepting new connections.

Defaults to Infinity (don’t force-close). If you want to immediately destroy all sockets set its value to 0.

See stoppable


gracePeriodForClose?: number;