refactor(db): rename serverReady variable

This commit is contained in:
Linden committed 2023-06-13 02:23:33 +10:00
1 parent 2ad0539107
commit 11b21f8ed2
4 files changed
+13 -13

No files matched your search

+2 -2
View File
@@ -5,7 +5,7 @@ import { CFXCallback, CFXParameters } from '../types';
import { parseResponse } from '../utils/parseResponse';
import { executeType, parseExecute } from '../utils/parseExecute';
import { scheduleTick } from '../utils/scheduleTick';
import { serverReady, waitForConnection } from '../database';
import { isServerConnected, waitForConnection } from '../database';
export const rawExecute = (
invokingResource: string,
@@ -28,7 +28,7 @@ export const rawExecute = (
scheduleTick();
return new Promise(async (resolve, reject) => {
if (!serverReady) await waitForConnection();
if (!isServerConnected) await waitForConnection();
pool.getConnection((err, connection) => {
if (err) return reject(err.message);