Hi, chriso.
I'm gavin of korea. (So, you could feel odd in my English.)
I found some issue on rapid request situation.
When curlrequest.request called rapidly, callback's data argument get "" string often.
With no error object and no stdrerr stream.
Also i checked packets, and it's good. there's no problem.
And I solved this issue, I think.
I changed bind of "exit" event to "close". And "" string output disappeared.
//Handle curl exit
curl.on('exit', function (code) {
try {
err = code;
to
curl.on('close', function (code) {
try {
err = code;
According to this API doc,
"exit" event can be emitted before stdout stream flushed.
Hi, chriso. I'm gavin of korea. (So, you could feel odd in my English.)
I found some issue on rapid request situation. When curlrequest.request called rapidly, callback's data argument get "" string often. With no error object and no stdrerr stream. Also i checked packets, and it's good. there's no problem.
And I solved this issue, I think.
I changed bind of "exit" event to "close". And "" string output disappeared.
According to this API doc, "exit" event can be emitted before stdout stream flushed.
How you think about this modification?