[mel-base-devel] closing imap folder handles
Kevin Raison
raison at chatsubo.net
Mon Jul 14 18:22:41 UTC 2008
First, I wanted to thank the developers for this package. I have been
using it to write a voicemail processing agent for a client and could
not have done it without mel. I do have one question: it seems that
imap folder connections don't actually get closed by the (close-folder)
function. I have a long-running process that eventually runs out of
file descriptors because of too many open imap connections. I have been
careful to call close-folder on each connection when I am done. I am
using SBCL 1.0.17 and have not seen any other problems. The function
that gets called on a periodic basis follows:
(defmethod process-user-mail ((user user))
(handler-case
(let ((mbox (mel:make-imap-folder :host (server user)
:username (username user)
:password (password user)
:mailbox "inbox")))
(dolist (msg (mel:messages mbox))
;; do some interesting things with msg
)
(mel:close-folder mbox))
(error (condition)
(logger :warning "mail check for ~a failed: ~a~%" (username user)
condition))))
Am I missing something?
Thanks.
Kevin Raison
More information about the mel-base-devel
mailing list