mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Fixing a super weird issue ljf encountered where the reader crashed because couldn't read the filescriptor ... Yolocommiting, let's see if this breaks something during our tests during next weeks ...
This commit is contained in:
parent
4c6945fe04
commit
06d8c48918
1 changed files with 7 additions and 3 deletions
|
@ -43,9 +43,13 @@ class AsynchronousFileReader(Process):
|
|||
else:
|
||||
data = ""
|
||||
while True:
|
||||
try:
|
||||
# Try to read (non-blockingly) a few bytes, append them to
|
||||
# the buffer
|
||||
data += os.read(self._fd, 50)
|
||||
except Exception as e:
|
||||
print("from moulinette.utils.stream: could not read file descriptor : %s" % str(e))
|
||||
continue
|
||||
|
||||
# If nobody's writing in there anymore, get out
|
||||
if not data and os.fstat(self._fd).st_nlink == 0:
|
||||
|
|
Loading…
Reference in a new issue