def restart(time=0):
    """Restart the server.

        The `time` should be greater-equal 0.

        If the `time` is 0, then we do a hard shutdown, i.e. closing
        all sockets without waiting for tasks to complete.

        If the `time` is not 0, then we will give the tasks `time` seconds to
        finish before shutting down.
        """
