mirror of
				https://gitee.com/ThingsGateway/ThingsGateway.git
				synced 2025-11-04 17:43:58 +08:00 
			
		
		
		
	更新opcuaclient
This commit is contained in:
		@@ -12,7 +12,7 @@ namespace ModbusDemo
 | 
			
		||||
            {
 | 
			
		||||
                OPCNode = new()
 | 
			
		||||
                {
 | 
			
		||||
                    OPCUrl = "opc.tcp://desktop-p5gb4iq:50001/StandardServer",
 | 
			
		||||
                    OPCUrl = "opc.tcp://127.0.0.1:49320",
 | 
			
		||||
                    IsUseSecurity = true,
 | 
			
		||||
                }
 | 
			
		||||
            };
 | 
			
		||||
 
 | 
			
		||||
@@ -546,8 +546,12 @@ public class OPCUAClient : DisposableObject
 | 
			
		||||
            m_reConnectHandler.SafeDispose();
 | 
			
		||||
            m_reConnectHandler = null;
 | 
			
		||||
        }
 | 
			
		||||
        m_session.KeepAlive -= Session_KeepAlive;
 | 
			
		||||
        m_session?.Close(10000);
 | 
			
		||||
        if(m_session!=null)
 | 
			
		||||
        {
 | 
			
		||||
            m_session.KeepAlive -= Session_KeepAlive;
 | 
			
		||||
            m_session.Close(10000);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
    #endregion
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user