Skip to content

Commit

Permalink
Merge pull request #42 from belettee/development
Browse files Browse the repository at this point in the history
fix already join check
  • Loading branch information
paulov-t committed Apr 22, 2024
2 parents e3453ec + d870b06 commit 96c6745
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/StayInTarkovMod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ export class StayInTarkovMod implements IPreAkiLoadMod, IPostDBLoadMod
url: "/coop/server/join",
action: (url, info, sessionId, output) => {

let coopMatch: CoopMatch = CoopMatch.CoopMatches[info.serverId];
const coopMatch: CoopMatch = CoopMatch.CoopMatches[info.serverId];
logger.info(coopMatch !== null ? "match exists" : "match doesn't exist!");

if(coopMatch === null || coopMatch === undefined) {
Expand Down Expand Up @@ -446,7 +446,7 @@ export class StayInTarkovMod implements IPreAkiLoadMod, IPostDBLoadMod
{
if(WebSocketHandler.Instance.webSockets[info.profileId] !== undefined)
{
if(WebSocketHandler.Instance.webSockets[info.profileId].readyState == WebSocket.OPEN)
if(WebSocketHandler.Instance.webSockets[info.profileId].websocket.readyState == WebSocket.OPEN)
{
logger.info(`JoinMatch failed: ${info.profileId} is already connected!`);

Expand Down

0 comments on commit 96c6745

Please sign in to comment.