|  | @@ -27,6 +27,10 @@ const (
 | 
											
												
													
														|  |  	StreamSecurityTypeTLS  StreamSecurityType = 1
 |  |  	StreamSecurityTypeTLS  StreamSecurityType = 1
 | 
											
												
													
														|  |  )
 |  |  )
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +var (
 | 
											
												
													
														|  | 
 |  | +	globalSessionCache = tls.NewLRUClientSessionCache(128)
 | 
											
												
													
														|  | 
 |  | +)
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |  type TLSSettings struct {
 |  |  type TLSSettings struct {
 | 
											
												
													
														|  |  	AllowInsecure bool
 |  |  	AllowInsecure bool
 | 
											
												
													
														|  |  	Certs         []tls.Certificate
 |  |  	Certs         []tls.Certificate
 | 
											
										
											
												
													
														|  | @@ -35,6 +39,7 @@ type TLSSettings struct {
 | 
											
												
													
														|  |  func (this *TLSSettings) GetTLSConfig() *tls.Config {
 |  |  func (this *TLSSettings) GetTLSConfig() *tls.Config {
 | 
											
												
													
														|  |  	config := &tls.Config{
 |  |  	config := &tls.Config{
 | 
											
												
													
														|  |  		InsecureSkipVerify: this.AllowInsecure,
 |  |  		InsecureSkipVerify: this.AllowInsecure,
 | 
											
												
													
														|  | 
 |  | +		ClientSessionCache: globalSessionCache,
 | 
											
												
													
														|  |  	}
 |  |  	}
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  	config.Certificates = this.Certs
 |  |  	config.Certificates = this.Certs
 |