summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorPhạm Ngọc Quang Nam <NamPNQ@users.noreply.github.com>2019-06-19 05:26:59 +0700
committerAndreas Rumpf <rumpf_a@web.de>2019-06-19 00:26:59 +0200
commit7c637c2faf2fdc096fb0788f3856c00bd9e164b0 (patch)
tree2460c6c320b89c574560e0ed8a24492efc526bc3 /lib
parent8ee0f14ab6b8decffe8673dac4d761c352d8e31d (diff)
downloadNim-7c637c2faf2fdc096fb0788f3856c00bd9e164b0.tar.gz
[bugfix] Fix smtp.nim unhandled exception (#11498)
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/smtp.nim3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/pure/smtp.nim b/lib/pure/smtp.nim
index 1e621a9e2..02d6f6f54 100644
--- a/lib/pure/smtp.nim
+++ b/lib/pure/smtp.nim
@@ -163,8 +163,7 @@ proc quitExcpt(smtp: AsyncSmtp, msg: string): Future[void] =
   var sendFut = smtp.debugSend("QUIT")
   sendFut.callback =
     proc () =
-      # TODO: Fix this in async procs.
-      raise newException(ReplyError, msg)
+      retFuture.fail(newException(ReplyError, msg))
   return retFuture
 
 proc checkReply(smtp: Smtp | AsyncSmtp, reply: string) {.multisync.} =