🐛 fix gateway

This commit is contained in:
Flam3rboy 2021-09-12 21:20:47 +02:00
parent 60535f5159
commit 0a0a61565e
4 changed files with 6 additions and 4 deletions

View File

@ -1,4 +1,5 @@
import WebSocket, { Server } from "@fosscord/gateway/util/WebSocket";
import WS from "ws";
import WebSocket from "@fosscord/gateway/util/WebSocket";
import { IncomingMessage } from "http";
import { Close } from "./Close";
import { Message } from "./Message";
@ -18,7 +19,7 @@ try {
// TODO: check msg max size
export async function Connection(
this: Server,
this: WS.Server,
socket: WebSocket,
request: IncomingMessage
) {

View File

@ -1,4 +1,4 @@
import WebSocket, { Data } from "@fosscord/gateway/util/WebSocket";
import WebSocket from "@fosscord/gateway/util/WebSocket";
var erlpack: any;
try {
erlpack = require("erlpack");

View File

@ -1,6 +1,7 @@
import { Intents, Permissions } from "@fosscord/util";
import WS from "ws";
import { Deflate } from "zlib";
import { Channel } from "amqplib";
interface WebSocket extends WS {
version: number;

View File

@ -21,7 +21,7 @@ export function initDatabase() {
//
entities: Object.values(Models).filter((x) => x.constructor.name !== "Object"),
synchronize: true,
logging: true,
logging: false,
cache: {
duration: 1000 * 3, // cache all find queries for 3 seconds
},