clojure-mail icon indicating copy to clipboard operation
clojure-mail copied to clipboard

watching imap silently fails upon network disconnection

Open michaelmrose opened this issue 5 years ago • 0 comments

Depending upon time disconnected it will either just silently miss events during disconnection and resume working or silently fail to connect but report that it is still functioning.

Is there a way to make it fail as soon as it is no longer connected?

I see https://javaee.github.io/javamail/docs/api/com/sun/mail/imap/package-summary.html

lists

mail.imap.connectiontimeout | int | Socket connection timeout value in milliseconds. This timeout is implemented by java.net.Socket. Default is infinite timeout.

mail.imap.timeout | int | Socket read timeout value in milliseconds. This timeout is implemented by java.net.Socket. Default is infinite timeout.

But either I'm setting them incorrectly or the end result is not as desired. It would be nice if clojure-mail exposed an option to set a timeout and a function to call on timeout.

michaelmrose avatar May 09 '20 21:05 michaelmrose