diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/jsonrpc.el | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/lisp/jsonrpc.el b/lisp/jsonrpc.el index 43b570cfd92..3d88bbf67c9 100644 --- a/lisp/jsonrpc.el +++ b/lisp/jsonrpc.el @@ -417,21 +417,19 @@ connection object, called when the process dies .") (cl-defmethod jsonrpc-shutdown ((conn jsonrpc-process-connection) &optional cleanup) - "Wait for JSONRPC connection CONN to shutdown and return t. -If the server wasn't running, do nothing and return nil. With -optional CLEANUP, kill any associated buffers. " + "Wait for JSONRPC connection CONN to shutdown. +With optional CLEANUP, kill any associated buffers. " (unwind-protect - (when (jsonrpc-running-p conn) - (cl-loop - with proc = (jsonrpc--process conn) - do - (delete-process proc) - (accept-process-output nil 0.1) - while (not (process-get proc 'jsonrpc-sentinel-done)) - do (jsonrpc--warn - "Sentinel for %s still hasn't run, deleting it!" proc) - finally return t)) - (when cleanup (kill-buffer (process-buffer (jsonrpc--process conn)))))) + (cl-loop + with proc = (jsonrpc--process conn) + do + (delete-process proc) + (accept-process-output nil 0.1) + while (not (process-get proc 'jsonrpc-sentinel-done)) + do (jsonrpc--warn + "Sentinel for %s still hasn't run, deleting it!" proc)) + (when cleanup + (kill-buffer (process-buffer (jsonrpc--process conn)))))) (defun jsonrpc-stderr-buffer (conn) "Get CONN's standard error buffer, if any." |
