Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies to get node-addon-api >=7.0.0 to fix builds on node 20.12.0 #2751

Merged
merged 10 commits into from
Apr 9, 2024
Merged
Empty file modified bin/dev.js
100644 → 100755
Empty file.
Empty file modified bin/run.js
100644 → 100755
Empty file.
13 changes: 0 additions & 13 deletions lib/utils/device/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
* limitations under the License.
*/
import * as _ from 'lodash';
import type { NodeJSSocketWithFileDescriptor } from 'net-keepalive';
import * as os from 'os';
import * as request from 'request';
import type * as Stream from 'stream';

Expand Down Expand Up @@ -214,17 +212,6 @@ export class DeviceAPI {
}
try {
res.socket.setKeepAlive(true, 1000);
if (os.platform() !== 'win32') {
const NetKeepalive = await import('net-keepalive');
// Certain versions of typescript won't convert
// this automatically
const sock = res.socket as any as NodeJSSocketWithFileDescriptor;
// We send a tcp keepalive probe once every 5 seconds
NetKeepalive.setKeepAliveInterval(sock, 5000);
// After 5 failed probes, the connection is marked as
// closed
NetKeepalive.setKeepAliveProbes(sock, 5);
}
} catch (error) {
reject(error);
}
Expand Down
Loading
Loading