From a393429f01e63aa37f58f8cbe4a810e59852fa61 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 29 Oct 2020 15:18:36 -0400 Subject: Implement JavaScript UI for attachments This one is a bit of a doozy. A summary of the changes: - Session has grown storage for attachments which have been uploaded but not yet sent. - The list of attachments on a message is refcounted so that we can clean up the temporary files only after it's done with - i.e. after copying to Sent and after all of the SMTP attempts are done. - Abandoned attachments are cleared out on process shutdown. Future work: - Add a limit to the maximum number of pending attachments the user can have in the session. - Periodically clean out abandoned attachments? --- cmd/alps/main.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cmd/alps/main.go') diff --git a/cmd/alps/main.go b/cmd/alps/main.go index dedd6cb..e519332 100644 --- a/cmd/alps/main.go +++ b/cmd/alps/main.go @@ -101,4 +101,6 @@ func main() { e.Logger.Print("Waiting for work queues to finish...") s.Queue.Shutdown() e.Logger.Print("Shut down.") + + s.Close() } -- cgit v1.2.3