connection testing

This commit is contained in:
Jan Prochazka
2022-12-25 12:48:10 +01:00
parent d66fc06403
commit 1eea117062
10 changed files with 103 additions and 16 deletions

View File

@@ -131,9 +131,9 @@ module.exports = {
},
ping_meta: true,
async ping({ connections }) {
async ping({ conidArray }) {
await Promise.all(
_.uniq(connections).map(async conid => {
_.uniq(conidArray).map(async conid => {
const last = this.lastPinged[conid];
if (last && new Date().getTime() - last < 30 * 1000) {
return Promise.resolve();