Make connect into an async function
This commit is contained in:
parent
269cba3ce3
commit
137120b4b7
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue