diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2019-10-14 23:46:27 +0200 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-10-14 17:46:27 -0400 |
commit | 4221b90c3febbe03a4b47e47248263741a0fdd4a (patch) | |
tree | 0c16487c197863fb1223f37a9c589905517dfdcd /core/libdeno/api.cc | |
parent | 605659535794ca0d8fe3ee4ea5857b418d7ce091 (diff) |
perf: eager poll async ops in Isolate (#3046)
Diffstat (limited to 'core/libdeno/api.cc')
-rw-r--r-- | core/libdeno/api.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/libdeno/api.cc b/core/libdeno/api.cc index 18dc1d43e..061638cb5 100644 --- a/core/libdeno/api.cc +++ b/core/libdeno/api.cc @@ -165,7 +165,7 @@ void deno_respond(Deno* d_, void* user_data, deno_op_id op_id, deno_buf buf) { if (d->current_args_ != nullptr) { // Synchronous response. // Note op_id is not passed back in the case of synchronous response. - if (buf.data_ptr != nullptr) { + if (buf.data_ptr != nullptr && buf.data_len > 0) { auto ab = deno::ImportBuf(d, buf); d->current_args_->GetReturnValue().Set(ab); } |