diff --git a/packages/graphql-language-service-server/src/startServer.js b/packages/graphql-language-service-server/src/startServer.js
index <HASH>..<HASH> 100644
--- a/packages/graphql-language-service-server/src/startServer.js
+++ b/packages/graphql-language-service-server/src/startServer.js
@@ -37,6 +37,8 @@ export default (async function startServer(
     const messageReader = new SocketMessageReader(socket);
     const messageWriter = new SocketMessageWriter(socket);
 
+    socket.on('close', () => process.exit(0));
+
     messageReader.listen(message => {
       try {
         if (message.id != null) {
prevent socket from hanging when the connection ends