mirror of
				https://github.com/Ylianst/MeshCentral.git
				synced 2025-03-09 15:40:18 +00:00 
			
		
		
		
	Completed device inactive auto-remove feature.
This commit is contained in:
		
							parent
							
								
									047916eb9a
								
							
						
					
					
						commit
						2281a61e30
					
				
					 4 changed files with 114 additions and 3 deletions
				
			
		|  | @ -2129,7 +2129,7 @@ function CreateMeshCentralServer(config, args) { | |||
|                 obj.DispatchEvent(obj.webserver.CreateNodeDispatchTargets(meshid, nodeid), obj, { action: 'nodeconnect', meshid: meshid, nodeid: nodeid, domain: nodeid.split('/')[1], conn: state.connectivity, pwr: state.powerState, ct: connectTime, nolog: 1, nopeers: 1 }); | ||||
| 
 | ||||
|                 // Save indication of node connection change
 | ||||
|                 const lc = { _id: 'lc' + nodeid, type: 'lastconnect', domain: nodeid.split('/')[1], meshid: meshid, time: Date.now(), cause: 1, connectType: connectType, serverid: obj.serverId }; | ||||
|                 const lc = { _id: 'lc' + nodeid, type: 'lastconnect', domain: nodeid.split('/')[1], meshid: meshid, time: Date.now(), cause: 1, connectType: connectType }; | ||||
|                 if (extraInfo && extraInfo.remoteaddrport) { lc.addr = extraInfo.remoteaddrport; } | ||||
|                 obj.db.Set(lc); | ||||
|             } | ||||
|  | @ -2200,7 +2200,7 @@ function CreateMeshCentralServer(config, args) { | |||
|                 state.connectivity -= connectType; | ||||
| 
 | ||||
|                 // Save indication of node connection change
 | ||||
|                 const lc = { _id: 'lc' + nodeid, type: 'lastconnect', domain: nodeid.split('/')[1], meshid: meshid, time: Date.now(), cause: 0, connectType: connectType, serverid: obj.serverId }; | ||||
|                 const lc = { _id: 'lc' + nodeid, type: 'lastconnect', domain: nodeid.split('/')[1], meshid: meshid, time: Date.now(), cause: 0, connectType: connectType }; | ||||
|                 if (extraInfo && extraInfo.remoteaddrport) { lc.addr = extraInfo.remoteaddrport; } | ||||
|                 obj.db.Set(lc); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue