* smtp.el (smtp-read-response): Signal an error if connection is
[elisp/flim.git] / smtp.el
diff --git a/smtp.el b/smtp.el
index 3704d46..0fcf274 100644 (file)
--- a/smtp.el
+++ b/smtp.el
@@ -654,6 +654,8 @@ BUFFER may be a buffer or a buffer name which contains mail message."
     (while response-continue
       (goto-char smtp-read-point)
       (while (not (search-forward smtp-end-of-line nil t))
+       (unless (smtp-connection-opened connection)
+         (signal 'smtp-error "Connection closed"))
        (accept-process-output (smtp-connection-process-internal connection))
        (goto-char smtp-read-point))
       (if decoder