@colyseus/core
Advanced tools
Comparing version 0.15.15 to 0.15.16
@@ -94,5 +94,27 @@ var __create = Object.create; | ||
}; | ||
(0, import_IPC.subscribeIPC)(presence, processId, getProcessChannel(), (_, args) => { | ||
return handleCreateRoom.apply(void 0, args); | ||
(0, import_IPC.subscribeIPC)(presence, processId, getProcessChannel(), (method, args) => { | ||
if (method === "healthcheck") { | ||
return true; | ||
} else { | ||
return handleCreateRoom.apply(void 0, args); | ||
} | ||
}); | ||
const previousStats = await stats.fetchAll(); | ||
if (previousStats.length > 0) { | ||
import_Logger.logger.debug(`${previousStats.length} previous processId(s) found, health-checking...`); | ||
await Promise.all(previousStats.map(async (stat) => { | ||
try { | ||
await (0, import_IPC.requestFromIPC)( | ||
presence, | ||
getProcessChannel(stat.processId), | ||
"healthcheck", | ||
[], | ||
import_Utils.REMOTE_ROOM_SHORT_TIMEOUT | ||
); | ||
} catch (e) { | ||
import_Logger.logger.debug(`process ${stat.processId} failed to respond. excluding from stats`); | ||
await stats.excludeProcess(stat.processId); | ||
} | ||
})); | ||
} | ||
await stats.reset(); | ||
@@ -314,3 +336,3 @@ if (import_DevMode.isDevMode) { | ||
} | ||
stats.excludeProcess(processId); | ||
await stats.excludeProcess(processId); | ||
presence.unsubscribe(getProcessChannel()); | ||
@@ -317,0 +339,0 @@ return Promise.all(disconnectAll( |
{ | ||
"name": "@colyseus/core", | ||
"version": "0.15.15", | ||
"version": "0.15.16", | ||
"description": "Multiplayer Framework for Node.js.", | ||
@@ -50,3 +50,3 @@ "input": "./src/index.ts", | ||
}, | ||
"gitHead": "5317c0246d268806ef051d324bf289ff0a56ba05" | ||
"gitHead": "f1a761cdced3a9bb5a381b0021bfb0fca02d0cb9" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
601951
6863