We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 211a5af commit 822c3aaCopy full SHA for 822c3aa
docs/developer-guide/using-libraries/child-processes.md
@@ -211,11 +211,11 @@ local function write_data(proc, data)
211
local written, errmsg = proc:write(data)
212
local total_written = written or 0
213
214
- while total_written < data_len and not errmsg do
+ while written and not errmsg and total_written < data_len do
215
written, errmsg = proc:write(data:sub(total_written + 1))
216
total_written = total_written + (written or 0)
217
218
- if (not written or written <= 0) and not errmsg and coroutine.running() then
+ if written == 0 and not errmsg and coroutine.running() then
219
-- with each consecutive fail the yield timeout is increased by 5ms
220
coroutine.yield((failures * 5) / 1000)
221
0 commit comments