(nntp-wait-for-string): Dont infloop if process died.
authorSimon Josefsson <jas@extundo.com>
Tue, 3 Sep 2002 19:15:36 +0000 (19:15 +0000)
committerSimon Josefsson <jas@extundo.com>
Tue, 3 Sep 2002 19:15:36 +0000 (19:15 +0000)
lisp/ChangeLog
lisp/nntp.el

index 8813750..47fe33c 100644 (file)
@@ -1,5 +1,7 @@
 2002-09-03  Simon Josefsson  <jas@extundo.com>
 
+       * nntp.el (nntp-wait-for-string): Dont infloop if process died.
+
        * gnus-agent.el (gnus-agent-batch): Add doc.
 
 2002-09-03  Josh Huber <huber@alum.wpi.edu>
index 1463c1e..dbd01ea 100644 (file)
@@ -1460,7 +1460,8 @@ password contained in '~/.nntp-authinfo'."
   "Wait until string arrives in the buffer."
   (let ((buf (current-buffer)))
     (goto-char (point-min))
-    (while (not (re-search-forward regexp nil t))
+    (while (and (nntp-find-connection nntp-server-buffer)
+               (not (re-search-forward regexp nil t)))
       (accept-process-output (nntp-find-connection nntp-server-buffer))
       (set-buffer buf)
       (goto-char (point-min)))))