Skip to content

Commit

Permalink
try get some callback deprecations away and remove nodej 22 again for…
Browse files Browse the repository at this point in the history
… now
  • Loading branch information
Apollon77 committed May 9, 2024
1 parent 19a5bbb commit 70eec45
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [16.x, 18.x, 20.x, 22.x]
node-version: [16.x, 18.x, 20.x]
os: [ubuntu-latest, windows-2019, windows-latest, macos-latest]

steps:
Expand Down
13 changes: 6 additions & 7 deletions src/mbus-master.cc
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ class RecieveWorker : public Nan::AsyncWorker {
char error[100];
int address;
int secondary_selected = 0;
int request_frame_res;

memset((void *)&reply, 0, sizeof(mbus_frame));

Expand Down Expand Up @@ -376,7 +375,7 @@ class RecieveWorker : public Nan::AsyncWorker {
Nan::New<String>(data).ToLocalChecked()
};
free(data);
callback->Call(2, argv);
callback->Call(2, argv, async_resource);
};

void HandleErrorCallback () {
Expand All @@ -388,7 +387,7 @@ class RecieveWorker : public Nan::AsyncWorker {
Nan::Error(ErrorMessage())
};

callback->Call(1, argv);
callback->Call(1, argv, async_resource);
}
private:
char *data;
Expand Down Expand Up @@ -586,7 +585,7 @@ class ScanSecondaryWorker : public Nan::AsyncWorker {
Nan::New<String>(data).ToLocalChecked()
};
free(data);
callback->Call(2, argv);
callback->Call(2, argv, async_resource);
};

void HandleErrorCallback () {
Expand All @@ -597,7 +596,7 @@ class ScanSecondaryWorker : public Nan::AsyncWorker {
Local<Value> argv[] = {
Nan::Error(ErrorMessage())
};
callback->Call(1, argv);
callback->Call(1, argv, async_resource);
}
private:
char *data;
Expand Down Expand Up @@ -769,7 +768,7 @@ class SetPrimaryWorker : public Nan::AsyncWorker {
Local<Value> argv[] = {
Nan::Null()
};
callback->Call(1, argv);
callback->Call(1, argv, async_resource);
};

void HandleErrorCallback () {
Expand All @@ -781,7 +780,7 @@ class SetPrimaryWorker : public Nan::AsyncWorker {
Nan::Error(ErrorMessage())
};

callback->Call(1, argv);
callback->Call(1, argv, async_resource);
}
private:
char *old_addr_str;
Expand Down

0 comments on commit 70eec45

Please sign in to comment.