Mercurial > templog
changeset 119:81591bdfa92c
try to flush
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 06 Oct 2012 23:58:37 +0800 |
parents | bb0c946460f3 |
children | 295a4b875677 de950be796dd |
files | server/ts.py |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/server/ts.py Sat Oct 06 23:53:28 2012 +0800 +++ b/server/ts.py Sat Oct 06 23:58:37 2012 +0800 @@ -42,8 +42,13 @@ return s +def flush(sock): + while readline(sock): + pass + @retry() def fetch(sock): + flush(sock) sock.send("fetch\n") crc = 0 @@ -94,6 +99,7 @@ if TESTING: return 99 L("Sending btoff") + flush(sock) sock.send("btoff\n"); # read newline l = readline(sock) @@ -121,6 +127,7 @@ @retry() def clear_meas(sock): + flush(sock) sock.send("clear\n"); l = readline(sock) if l and l.rstrip() == 'cleared':