async def _wait_for_exit(input_channel: connection.TextReader, output_channel: connection.TextWriter) -> None:
    '\n    Wait for an LSP "exit" request from the `input_channel`. This is mostly useful\n    when the LSP server has received a "shutdown" request, in which case the LSP\n    specification dictates that only "exit" can be sent from the client side.\n\n    If a non-exit LSP request is received, drop it and keep waiting on another\n    "exit" request.\n    '
    while True:
        async with _read_lsp_request(input_channel, output_channel) as request:
            if (request.method == 'exit'):
                return
            else:
                raise json_rpc.InvalidRequestError(f'Only exit requests are accepted after shutdown. Got {request}.')
Wait for an LSP "exit" request from the `input_channel`. This is mostly useful
when the LSP server has received a "shutdown" request, in which case the LSP
specification dictates that only "exit" can be sent from the client side.

If a non-exit LSP request is received, drop it and keep waiting on another
"exit" request.
async def _wait_for_exit(input_channel: connection.TextReader, output_channel: connection.TextWriter) -> None:
    '\n    Wait for an LSP "exit" request from the `input_channel`. This is mostly useful\n    when the LSP server has received a "shutdown" request, in which case the LSP\n    specification dictates that only "exit" can be sent from the client side.\n\n    If a non-exit LSP request is received, drop it and keep waiting on another\n    "exit" request.\n    '
    while True:
        async with _read_lsp_request(input_channel, output_channel) as request:
            if (request.method == 'exit'):
                return
            else:
                raise json_rpc.InvalidRequestError(f'Only exit requests are accepted after shutdown. Got {request}.')