summaryrefslogtreecommitdiff
path: root/notmuch-tcp-server
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2020-03-08 11:54:11 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2020-03-08 11:54:11 +0100
commit15dcba11d052f265f56ce8c57824c39eefb36153 (patch)
treeb9b752c94db75bdf8b905fec851f64930f07ab06 /notmuch-tcp-server
parentf0859313b6b96149fd7f355f9bb6c32c842cff17 (diff)
downloadutils-15dcba11d052f265f56ce8c57824c39eefb36153.tar
utils-15dcba11d052f265f56ce8c57824c39eefb36153.tar.gz
utils-15dcba11d052f265f56ce8c57824c39eefb36153.tar.bz2
utils-15dcba11d052f265f56ce8c57824c39eefb36153.tar.xz
utils-15dcba11d052f265f56ce8c57824c39eefb36153.zip
...
Diffstat (limited to 'notmuch-tcp-server')
-rw-r--r--notmuch-tcp-server3
1 files changed, 2 insertions, 1 deletions
diff --git a/notmuch-tcp-server b/notmuch-tcp-server
index 50ac8be..69f61f5 100644
--- a/notmuch-tcp-server
+++ b/notmuch-tcp-server
@@ -70,12 +70,13 @@ with s as sock:
70 70
71 with BytesIO() as buffer: 71 with BytesIO() as buffer:
72 while True: 72 while True:
73 logger.debug("Reading arguments...")
73 resp = conn.recv(256) 74 resp = conn.recv(256)
74 buffer.write(resp) 75 buffer.write(resp)
75 buffer.seek(0) 76 buffer.seek(0)
76 start_index = 0 77 start_index = 0
77 for line in buffer: 78 for line in buffer:
78 if not line.find(b"\n"): 79 if line[-1:] != b"\n":
79 break 80 break
80 81
81 start_index += len(line) 82 start_index += len(line)