From 179112e005b2086ca79253c312490bba8d225ff8 Mon Sep 17 00:00:00 2001 From: balki <3070606-balki@users.noreply.gitlab.com> Date: Wed, 19 Dec 2018 02:07:43 -0500 Subject: [PATCH] remove drain --- mail4one/pop3.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/mail4one/pop3.py b/mail4one/pop3.py index 4c8debe..afb4b02 100644 --- a/mail4one/pop3.py +++ b/mail4one/pop3.py @@ -65,10 +65,6 @@ def write(data): Session.writer().write(data) -async def drain(): - await Session.writer().drain() - - def validate_user_and_pass(username, password): if username != password: raise AuthError("Invalid user pass") @@ -135,7 +131,6 @@ def trans_command_list(mails, req): for entry in mails.get_all(): write(msg(f"{entry.nid} {entry.size}")) write(end()) - await drain() def trans_command_uidl(mails, req): @@ -150,7 +145,6 @@ def trans_command_uidl(mails, req): for entry in mails.get_all(): write(msg(f"{entry.nid} {entry.uid}")) write(end()) - await drain() def trans_command_retr(mails, req): @@ -208,6 +202,7 @@ async def process_transactions(mails_list: List[MailEntry]): raise ClientError("We shouldn't reach here") else: func(mails, req) + await Session.writer().drain() async def transaction_stage(deleted_items_path: Path):