diff --git a/src/language_server_api.cc b/src/language_server_api.cc index 3c94d42b..0211eb58 100644 --- a/src/language_server_api.cc +++ b/src/language_server_api.cc @@ -35,8 +35,10 @@ std::unique_ptr MessageRegistry::ReadMessageFromStdin() { std::getline(std::cin, line); // No content; end of stdin. - if (line.empty()) - return nullptr; + if (line.empty()) { + std::cerr << "stdin closed; exiting" << std::endl; + exit(0); + } // std::cin >> line; // std::cerr << "Read line " << line;