From 38e190ea52b508097e8e8c1a02bb1df7d486e016 Mon Sep 17 00:00:00 2001 From: Leandro Facchinetti Date: Sun, 22 Mar 2020 11:42:08 -0400 Subject: [PATCH] . --- src/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/index.tsx b/src/index.tsx index 13f9987..1a73842 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -66,7 +66,10 @@ export const emailServer = new SMTPServer({ await fs.writeFile(path, renderXML(xml)); } callback(); - })().catch(callback); + })().catch(error => { + console.error(error); + stream.end(() => callback(error)); + }); } }).listen(process.env.NODE_ENV === "production" ? 25 : 2525);