race-the-beam: improve phrasing

This commit is contained in:
ed 2025-04-13 18:51:45 +00:00
parent 98dcaee210
commit 2bd955ba9f

View file

@ -4246,6 +4246,7 @@ class HttpCli(object):
self.log(t % (data_end / M, lower / M, upper / M), 6)
with self.u2mutex:
if data_end > self.u2fh.aps.get(ap_data, data_end):
fhs: Optional[set[typing.BinaryIO]] = None
try:
fhs = self.u2fh.cache[ap_data].all_fhs
for fh in fhs:
@ -4253,7 +4254,11 @@ class HttpCli(object):
self.u2fh.aps[ap_data] = data_end
self.log("pipe: flushed %d up2k-FDs" % (len(fhs),))
except Exception as ex:
self.log("pipe: u2fh flush failed: %r" % (ex,))
if fhs is None:
err = "file is not being written to right now"
else:
err = repr(ex)
self.log("pipe: u2fh flush failed: " + err)
if lower >= data_end:
if data_end: