Undo.
[riece] / lisp / riece-filter.el
index a19221a..89abe6f 100644 (file)
                (throw 'contiguous nil)))))
        (forward-line)))))
 
+(eval-when-compile
+  (autoload 'riece-exit "riece"))
 (defun riece-sentinel (process status)
   (if riece-reconnect-with-password
       (let ((server-name
              (riece-part-channel (car channels)))
          (setq channels (cdr channels))))
       (riece-redisplay-buffers)
-      (riece-close-server-process process))))
+      (riece-close-server-process process)
+      ;; If no server process is available, exit.
+      (unless riece-process-list
+       (riece-exit)))))
 
 (provide 'riece-filter)