Skip to content

Commit

Permalink
[doc] Remove no longer needed noop function from code snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
lpinca committed Sep 13, 2021
1 parent 5b85322 commit 055949f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,6 @@ endpoint is still responsive.
```js
import { WebSocketServer } from 'ws';

function noop() {}

function heartbeat() {
this.isAlive = true;
}
Expand All @@ -428,7 +426,7 @@ const interval = setInterval(function ping() {
if (ws.isAlive === false) return ws.terminate();

ws.isAlive = false;
ws.ping(noop);
ws.ping();
});
}, 30000);

Expand Down

0 comments on commit 055949f

Please sign in to comment.