diff --git a/node-binding/client.cc b/node-binding/client.cc index 2d2227f7..52dc0a5f 100644 --- a/node-binding/client.cc +++ b/node-binding/client.cc @@ -33,6 +33,7 @@ public: uint64_t offset = 0, len = 0, version = 0; bool with_parents = false; Nan::Persistent callback; + Nan::Persistent buffer_ref; }; static uint64_t get_ui64(const v8::Local & val) @@ -182,6 +183,7 @@ NodeVitastorRequest* NodeVitastor::get_write_request(const Nan::FunctionCallback req->offset = offset; req->version = version; + req->buffer_ref.Reset(bufarg); if (bufarg->IsArray()) {