Method
ServerInterface::drain
Stop accepting; ServerInterface::run returns once every connection has ended. Meanwhile the worker stops the requests in flight with a WorkerStoppingException at their wait, and the server ends its protocol for each (a 503 for a response not yet begun).
Description#
public ServerInterface::drain(
bool $linger = false
): voidUpgraded connections stay until they close, or until the worker's stop ends their coroutines.
Parameters#
- $linger bool = false
- A recycle: the worker keeps its upgraded connections for now