From 055949fd23b0d7f6a23ba9b9532b7834909df192 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Mon, 13 Sep 2021 20:29:42 +0200 Subject: [PATCH] [doc] Remove no longer needed noop function from code snippet --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index a0317031b..c6b71110e 100644 --- a/README.md +++ b/README.md @@ -410,8 +410,6 @@ endpoint is still responsive. ```js import { WebSocketServer } from 'ws'; -function noop() {} - function heartbeat() { this.isAlive = true; } @@ -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);