resolve hoisting

This commit is contained in:
David Fiala 2024-05-28 22:43:51 -07:00
parent 19cdc1233c
commit bed5e85af9
1 changed files with 4 additions and 1 deletions

View File

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