Don't remove IMAP connections from the memoized list when they are
authorChris Hanson <org/chris-hanson/cph>
Sun, 28 May 2000 03:12:56 +0000 (03:12 +0000)
committerChris Hanson <org/chris-hanson/cph>
Sun, 28 May 2000 03:12:56 +0000 (03:12 +0000)
closed.  Each folder retains a pointer to its connection after closing
it, and may reopen the connection later.  When this happens, it
defeats the purpose of the memoization.

v7/src/imail/imail-imap.scm

index 5633ecbacaeddfa13371ffd654153bbfa3828c0e..615542a97df23ad91dcc44510a7e851ab72ea110 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;; $Id: imail-imap.scm,v 1.93 2000/05/26 17:27:15 cph Exp $
+;;; $Id: imail-imap.scm,v 1.94 2000/05/28 03:12:56 cph Exp $
 ;;;
 ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology
 ;;;
          (lambda ()
            (let ((port (imap-connection-port connection)))
              (set-imap-connection-port! connection #f)
-             (let loop ((connections memoized-imap-connections) (prev #f))
-               (if (weak-pair? connections)
-                   (let ((next (weak-cdr connections)))
-                     (if (eq? (weak-car connections) connection)
-                         (if prev
-                             (weak-set-cdr! prev next)
-                             (set! memoized-imap-connections next))
-                         (loop next connections)))))
              port)))))
     (if port
        (close-port port)))