INNER CODE UNIT · JavaScript

tr

riclolsen/json-scada · src/OPC-UA-Server/index.js:1075

  let tr = setTimeout(() => {
    Log.log('Mongo ping timeout error!')
    HintMongoIsConnected = false
  }, CheckMongoConnectionTimeout)

  let res = null
  try {
    res = await client.db('admin').command({ ping: 1 })
    clearTimeout(tr)
  } catch (e) {
    clearTimeout(tr)
    Log.log('Error on mongodb connection!')
    return false
  }
  if (res && 'ok' in res && res.ok) {
    HintMongoIsConnected = true
    return true
  } else {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…