Make connect into an async function

This commit is contained in:
TheEssem 2021-06-26 20:58:22 -05:00
parent 269cba3ce3
commit 137120b4b7
No known key found for this signature in database
GPG key ID: A3F9F02129092FCA

View file

@ -67,7 +67,7 @@ exports.getRunning = async () => {
}
};
exports.connect = (server) => {
exports.connect = async (server) => {
const connection = new WebSocket(`ws://${server}:8080/sock`);
connection.on("message", async (msg) => {
const opcode = msg.readUint8(0);