[bugfix] Fix smtp.nim unhandled exception (#11498)

(cherry picked from commit 7c637c2faf)
This commit is contained in:
Phạm Ngọc Quang Nam
2019-06-19 05:26:59 +07:00
committed by narimiran
parent c57485e67b
commit 368e12ed36

View File

@@ -149,8 +149,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.} =