testing pings

This commit is contained in:
Martina 2021-01-09 15:30:52 -08:00
parent 09fc78f24e
commit 1ddd4f3bae
2 changed files with 2 additions and 2 deletions

View File

@ -21,6 +21,7 @@ export const create = () => {
});
ws.on("ping", function () {
NodeLogging.log(`Pinged`);
clearTimeout(this.pingTimeout);
this.pingTimeout = setTimeout(() => {

View File

@ -19,8 +19,6 @@ import compression from "compression";
import cors from "cors";
import morgan from "morgan";
Websocket.create();
const app = next({
dev: !Environment.IS_PRODUCTION,
dir: __dirname,
@ -476,6 +474,7 @@ app.prepare().then(async () => {
const listenServer = server.listen(Environment.PORT, (e) => {
console.log("listen server function called");
if (e) throw e;
Websocket.create();
NodeLogging.log(`started on http://localhost:${Environment.PORT}`);
});