owainlewis / clojure-mail

A Clojure library for parsing, downloading and reading email from IMAP servers.
202 stars 54 forks source link

Close FileInputStream in file->message #62

Closed amoe closed 6 years ago

amoe commented 6 years ago

with-open makes sure that the FileInputStream gets closed after the message is read.

(This can be a problem when reading many messages in a single JVM, you can exhaust available file descriptors.)