hoist in second location

This commit is contained in:
David Fiala 2024-05-28 22:46:48 -07:00
parent bed5e85af9
commit d325b5fff3
1 changed files with 4 additions and 1 deletions

View File

@ -1443,6 +1443,9 @@ export class Server {
);
};
/* eslint-disable-next-line prefer-const */
let sendPing: () => void; // hoisted for use in maybeStartKeepalivePingTimer
const maybeStartKeepalivePingTimer = () => {
if (!canSendPing()) {
return;
@ -1457,7 +1460,7 @@ export class Server {
keepaliveTimeout.unref?.();
};
const sendPing = () => {
sendPing = () => {
if (!canSendPing()) {
return;
}