* pop3.el (pop3-retr): Error out if the server closes the connection.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Mon, 30 May 2011 17:16:48 +0000 (19:16 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Mon, 30 May 2011 17:16:48 +0000 (19:16 +0200)
lisp/ChangeLog
lisp/pop3.el

index 547d7e3..b4fdd08 100644 (file)
@@ -1,3 +1,7 @@
+2011-05-30  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * pop3.el (pop3-retr): Error out if the server closes the connection.
+
 2011-05-29  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * shr.el (shr-urlify): Use shr-add-font to make underlines be less ugly
index 6f12d3d..43b01fb 100644 (file)
@@ -514,6 +514,8 @@ Otherwise, return the size of the message-id MSG"
   (let ((start pop3-read-point) end)
     (with-current-buffer (process-buffer process)
       (while (not (re-search-forward "^\\.\r\n" nil t))
+       (unless (memq (process-status process) '(open run))
+         (error "pop3 server closed the connection"))
        (pop3-accept-process-output process)
        (goto-char start))
       (setq pop3-read-point (point-marker))