mirror of
https://github.com/uNetworking/uWebSockets.js.git
synced 2026-03-07 18:00:52 -05:00
Actually delete persistence in destructor of websockets
This commit is contained in:
@@ -20,7 +20,7 @@ void uWS_App_ws(const FunctionCallbackInfo<Value> &args) {
|
||||
UniquePersistent<Function> closePf;
|
||||
|
||||
struct PerSocketData {
|
||||
Persistent<Object> *socketPf;
|
||||
UniquePersistent<Object> *socketPf;
|
||||
};
|
||||
|
||||
/* Get the behavior object */
|
||||
@@ -60,7 +60,7 @@ void uWS_App_ws(const FunctionCallbackInfo<Value> &args) {
|
||||
|
||||
/* Attach a new V8 object with pointer to us, to us */
|
||||
PerSocketData *perSocketData = (PerSocketData *) ws->getUserData();
|
||||
perSocketData->socketPf = new Persistent<Object>;
|
||||
perSocketData->socketPf = new UniquePersistent<Object>;
|
||||
perSocketData->socketPf->Reset(isolate, wsObject);
|
||||
|
||||
Local<Function> openLf = Local<Function>::New(isolate, openPf);
|
||||
|
||||
Reference in New Issue
Block a user