fix: TypeError (No Overload matches this call)
This commit is contained in:
parent
9c8d0b6cb0
commit
edfd65335c
@ -10,6 +10,12 @@ let io: SocketIOServer | undefined;
|
|||||||
export function startupSocketIOServer(httpServer: HttpServer | null) {
|
export function startupSocketIOServer(httpServer: HttpServer | null) {
|
||||||
if (io) return;
|
if (io) return;
|
||||||
console.log('\x1b[35m[ws:kit]\x1b[0m setup');
|
console.log('\x1b[35m[ws:kit]\x1b[0m setup');
|
||||||
|
|
||||||
|
if (!httpServer) {
|
||||||
|
console.error('Error: httpServer is null. Cannot start Socket.IO server.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
io = new SocketIOServer(httpServer);
|
io = new SocketIOServer(httpServer);
|
||||||
|
|
||||||
io.on('connection', async (socket) => {
|
io.on('connection', async (socket) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user