mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-11-03 20:17:59 +00:00 
			
		
		
		
	Re-add some functionality lost during last dep update (#3636)
This commit is contained in:
		@@ -39,7 +39,7 @@ func pathConfig(b *backend) *framework.Path {
 | 
			
		||||
			"read_timeout": &framework.FieldSchema{
 | 
			
		||||
				Type:        framework.TypeDurationSecond,
 | 
			
		||||
				Default:     10,
 | 
			
		||||
				Description: "Number of seconds before response times out (default: 10). Note: kept for backwards compatibility, currently unused.",
 | 
			
		||||
				Description: "Number of seconds before response times out (default: 10)",
 | 
			
		||||
			},
 | 
			
		||||
			"nas_port": &framework.FieldSchema{
 | 
			
		||||
				Type:        framework.TypeInt,
 | 
			
		||||
 
 | 
			
		||||
@@ -154,7 +154,9 @@ func (b *backend) RadiusLogin(req *logical.Request, username string, password st
 | 
			
		||||
			Timeout: time.Duration(cfg.DialTimeout) * time.Second,
 | 
			
		||||
		},
 | 
			
		||||
	}
 | 
			
		||||
	received, err := client.Exchange(context.Background(), packet, hostport)
 | 
			
		||||
	ctx, cancelFunc := context.WithTimeout(context.Background(), time.Duration(cfg.ReadTimeout)*time.Second)
 | 
			
		||||
	received, err := client.Exchange(ctx, packet, hostport)
 | 
			
		||||
	cancelFunc()
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, logical.ErrorResponse(err.Error()), nil
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user