timeout.
* nntp.el (nntp-accept-process-output): Removed timeout.
(nntp-read-timeout): New variable.
(nntp-accept-process-output): Use it.
* gnus-sum.el (gnus-data-find-list): Remove *.
+2003-01-23 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus-async.el (gnus-async-wait-for-article): Don't use a
+ timeout.
+
+ * nntp.el (nntp-accept-process-output): Removed timeout.
+ (nntp-read-timeout): New variable.
+ (nntp-accept-process-output): Use it.
+
+ * gnus-sum.el (gnus-data-find-list): Remove *.
+
2002-01-23 Kevin Greiner <kgreiner@xpediantsolutions.com>
* gnus-sum.el (gnus-summary-first-subject): Fixed bug that I
2002-01-23 Kevin Greiner <kgreiner@xpediantsolutions.com>
* gnus-sum.el (gnus-summary-first-subject): Fixed bug that I
;; needs to be done in nntp.el.
(while (eq article gnus-async-current-prefetch-article)
(incf tries)
;; needs to be done in nntp.el.
(while (eq article gnus-async-current-prefetch-article)
(incf tries)
- (when (nntp-accept-process-output proc 1)
+ (when (nntp-accept-process-output proc)
(setq tries 0))
(when (and (not nntp-have-messaged)
(= tries 3))
(setq tries 0))
(when (and (not nntp-have-messaged)
(= tries 3))
`(assq ,number gnus-newsgroup-data))
(defmacro gnus-data-find-list (number &optional data)
`(assq ,number gnus-newsgroup-data))
(defmacro gnus-data-find-list (number &optional data)
- `(let* ((bdata ,(or data 'gnus-newsgroup-data)))
+ `(let ((bdata ,(or data 'gnus-newsgroup-data)))
(memq (assq ,number bdata)
bdata)))
(memq (assq ,number bdata)
bdata)))
"*Hook run just before posting an article. It is supposed to be used
to insert Cancel-Lock headers.")
"*Hook run just before posting an article. It is supposed to be used
to insert Cancel-Lock headers.")
+(defvoo nntp-read-timeout 0.1
+ "How long nntp should wait between checking for the end of output.
+Shorter values mean quicker response, but is more CPU intensive.")
+
;;; Internal variables.
(defvar nntp-record-commands nil
;;; Internal variables.
(defvar nntp-record-commands nil
(nnheader-report 'nntp message)
message))
(nnheader-report 'nntp message)
message))
-(defun nntp-accept-process-output (process &optional timeout)
+(defun nntp-accept-process-output (process)
"Wait for output from PROCESS and message some dots."
(save-excursion
(set-buffer (or (nntp-find-connection-buffer nntp-server-buffer)
"Wait for output from PROCESS and message some dots."
(save-excursion
(set-buffer (or (nntp-find-connection-buffer nntp-server-buffer)
(unless (< len 10)
(setq nntp-have-messaged t)
(nnheader-message 7 "nntp read: %dk" len)))
(unless (< len 10)
(setq nntp-have-messaged t)
(nnheader-message 7 "nntp read: %dk" len)))
- (if timeout
- (accept-process-output process timeout)
- (accept-process-output process 0 100))
+ (accept-process-output
+ process
+ (truncate nntp-read-timeout)
+ (truncate (* (- nntp-read-timeout
+ (truncate nntp-read-timeout))
+ 1000)))
;; accept-process-output may update status of process to indicate
;; that the server has closed the connection. This MUST be
;; handled here as the buffer restored by the save-excursion may
;; be the process's former output buffer (i.e. now killed)
(or (and process
;; accept-process-output may update status of process to indicate
;; that the server has closed the connection. This MUST be
;; handled here as the buffer restored by the save-excursion may
;; be the process's former output buffer (i.e. now killed)
(or (and process
- (memq (process-status process) '(open run)))
+ (memq (process-status process) '(open run)))
(nntp-report "Server closed connection"))))
(defun nntp-accept-response ()
(nntp-report "Server closed connection"))))
(defun nntp-accept-response ()