updated search of UC
This commit is contained in:
@@ -59,12 +59,13 @@ export class NetworkScanner {
|
||||
this.log('UC Check running...', 'log', 'startUCCheck')
|
||||
const udpClient = new UdpClient(this.udpPort)
|
||||
const aliveClients = await udpClient.getTargetClients(operationCodes.ARE_YOU_UC)
|
||||
console.log(aliveClients)
|
||||
const data = await this.db.read()
|
||||
const foundClient = aliveClients.length > 0
|
||||
const serverFound = data.app_config.server_found
|
||||
|
||||
if (foundClient) {
|
||||
const ipAddress = aliveClients[0]
|
||||
const ipAddress = aliveClients[0].ipAddress
|
||||
|
||||
if (data.network.serverIp !== ipAddress) {
|
||||
await this.db.update((data) => {
|
||||
@@ -108,7 +109,6 @@ export class NetworkScanner {
|
||||
try {
|
||||
this.log('IP Lookup running...', 'log', 'startUserIPLookup')
|
||||
const data = await this.db.read()
|
||||
const serverIp = data.network.serverIp
|
||||
const udpClient = new UdpClient(this.udpPort)
|
||||
const activeClients = await udpClient.getTargetClients(operationCodes.ARE_YOU_HUMAN)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user