Skip to content

Commit 3dac94d

Browse files
Merge pull request #2751 from balena-io/drivelist-v12
Update dependencies to get node-addon-api >=7.0.0 to fix builds on node 20.12.0
2 parents 71345a8 + 04b4444 commit 3dac94d

12 files changed

+483
-2079
lines changed

bin/dev.js

100644100755
File mode changed.

bin/run.js

100644100755
File mode changed.

lib/utils/device/api.ts

-13
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
* limitations under the License.
1616
*/
1717
import * as _ from 'lodash';
18-
import type { NodeJSSocketWithFileDescriptor } from 'net-keepalive';
19-
import * as os from 'os';
2018
import * as request from 'request';
2119
import type * as Stream from 'stream';
2220

@@ -214,17 +212,6 @@ export class DeviceAPI {
214212
}
215213
try {
216214
res.socket.setKeepAlive(true, 1000);
217-
if (os.platform() !== 'win32') {
218-
const NetKeepalive = await import('net-keepalive');
219-
// Certain versions of typescript won't convert
220-
// this automatically
221-
const sock = res.socket as any as NodeJSSocketWithFileDescriptor;
222-
// We send a tcp keepalive probe once every 5 seconds
223-
NetKeepalive.setKeepAliveInterval(sock, 5000);
224-
// After 5 failed probes, the connection is marked as
225-
// closed
226-
NetKeepalive.setKeepAliveProbes(sock, 5);
227-
}
228215
} catch (error) {
229216
reject(error);
230217
}

0 commit comments

Comments
 (0)