mirror of
				https://github.com/Ylianst/MeshCentral.git
				synced 2025-10-29 15:25:01 -04:00 
			
		
		
		
	fix connectivity crashing serverstats #7003
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
		
							parent
							
								
									0ee73bd98a
								
							
						
					
					
						commit
						9699e9b457
					
				| @ -2095,7 +2095,8 @@ function CreateMeshCentralServer(config, args) { | ||||
|                             for (var i in obj.mpsserver.ciraConnections) { data.conn.amc += obj.mpsserver.ciraConnections[i].length; } | ||||
|                         } | ||||
|                         for (var i in obj.connectivityByNode) { | ||||
|                             if (obj.connectivityByNode[i].connectivity == 4) { data.conn.am++; } | ||||
|                             const node = parent.parent.connectivityByNode[i]; | ||||
|                             if (node && typeof node.connectivity !== 'undefined' && node.connectivity === 4) { data.conn.am++; } | ||||
|                         } | ||||
|                         if (obj.firstStats === true) { delete obj.firstStats; data.first = true; } | ||||
|                         if (obj.multiServer != null) { data.s = obj.multiServer.serverid; } | ||||
|  | ||||
| @ -512,7 +512,8 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use | ||||
|                     for (var i in parent.parent.mpsserver.ciraConnections) { serverStats.ConnectedIntelAMTCira += parent.parent.mpsserver.ciraConnections[i].length; } | ||||
|                 } | ||||
|                 for (var i in parent.parent.connectivityByNode) { | ||||
|                     if (parent.parent.connectivityByNode[i].connectivity == 4) { serverStats.ConnectedIntelAMT++; } | ||||
|                     const node = parent.parent.connectivityByNode[i]; | ||||
|                     if (node && typeof node.connectivity !== 'undefined' && node.connectivity === 4) { serverStats.ConnectedIntelAMT++; } | ||||
|                 } | ||||
| 
 | ||||
|                 // Take a look at agent errors
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user