| 
						
						
							
								
							
						
						
					 | 
					@ -43,7 +43,10 @@ reConn: | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						opts.SetUsername(the.UserName) | 
					 | 
					 | 
						opts.SetUsername(the.UserName) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						opts.SetPassword(the.Password) | 
					 | 
					 | 
						opts.SetPassword(the.Password) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						opts.SetClientID(the.ClientId) | 
					 | 
					 | 
						opts.SetClientID(the.ClientId) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
						opts.SetCleanSession(false) // 通常需要关闭 CleanSession
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
						opts.SetResumeSubs(true)    // 启用 ResumeSubs
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						opts.SetOnConnectHandler(the.reConn2Subscribe) | 
					 | 
					 | 
						opts.SetOnConnectHandler(the.reConn2Subscribe) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
						opts.SetMaxReconnectInterval(10 * time.Second) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						if sslEnable { | 
					 | 
					 | 
						if sslEnable { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							opts.SetTLSConfig(NewTlsConfig(caCertPath, clientCertPath, clientKeyPath)) | 
					 | 
					 | 
							opts.SetTLSConfig(NewTlsConfig(caCertPath, clientCertPath, clientKeyPath)) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						} | 
					 | 
					 | 
						} | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |