From 96d928963085aae311a20c84ac74578879b3632d Mon Sep 17 00:00:00 2001 From: Florent Daigniere Date: Sun, 30 Oct 2022 22:12:15 +0100 Subject: [PATCH] No need to send an extra \n --- core/base/libs/podop/podop/dovecot.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/base/libs/podop/podop/dovecot.py b/core/base/libs/podop/podop/dovecot.py index 8fc06d6d..1206b5ef 100644 --- a/core/base/libs/podop/podop/dovecot.py +++ b/core/base/libs/podop/podop/dovecot.py @@ -118,7 +118,9 @@ class DictProtocol(asyncio.Protocol): break rows.append(self.process_lookup((path.decode("utf8")+k).encode("utf8"), user, is_iter=True)) await asyncio.gather(*rows) - return await self.reply(b"\n") # ITER_FINISHED + async with self.transport_lock: + self.transport.write(b"\n") # ITER_FINISHED + return except KeyError: return await self.reply(b"F") except Exception as e: @@ -160,8 +162,7 @@ class DictProtocol(asyncio.Protocol): logging.debug("Replying {} with {}".format(command, args)) self.transport.write(command) self.transport.write(b"\t".join(map(tabescape, args))) - if end: - self.transport.write(b"\n") + self.transport.write(b"\n") @classmethod def factory(cls, table_map):