Skip to content

Commit

Permalink
Don't write empty data
Browse files Browse the repository at this point in the history
  • Loading branch information
asmacdo committed May 14, 2024
1 parent d8bd80a commit cae78a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/duct.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,8 @@ def fileno(self):
def _tail(self):
while not self.stop_event.is_set():
data = self.infile.read()
self.buffer.write(data)
if data:
self.buffer.write(data)
self.buffer.flush()
# Do we really need this? TODO should be configurable
time.sleep(0.01)
Expand Down

0 comments on commit cae78a0

Please sign in to comment.