Skip to content

Commit

Permalink
Merge pull request kubernetes-client#635 from bacongobbler/remove-net…
Browse files Browse the repository at this point in the history
…-keepalive

fix: remove dependency on net-keepalive
  • Loading branch information
k8s-ci-robot authored Apr 11, 2021
2 parents a3e1501 + a3e6c0a commit 6c5a58f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 87 deletions.
88 changes: 5 additions & 83 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"isomorphic-ws": "^4.0.1",
"js-yaml": "^3.13.1",
"jsonpath-plus": "^0.19.0",
"net-keepalive": "2.0.4",
"openid-client": "^4.1.1",
"request": "^2.88.0",
"rfc4648": "^1.3.0",
Expand Down
4 changes: 1 addition & 3 deletions src/watch.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import byline = require('byline');
import keepalive = require('net-keepalive');
import request = require('request');
import { Duplex } from 'stream';
import { KubeConfig } from './config';
Expand Down Expand Up @@ -115,8 +114,7 @@ export class Watch {
req.on('error', doneCallOnce);
req.on('socket', (socket) => {
socket.setTimeout(30000);
socket.setKeepAlive(true);
keepalive.setKeepAliveInterval(socket, 30000);
socket.setKeepAlive(true, 30000);
});
stream.on('error', doneCallOnce);
stream.on('close', () => doneCallOnce(null));
Expand Down

0 comments on commit 6c5a58f

Please sign in to comment.