mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-13 18:17:02 +02:00
Re-add some functionality lost during last dep update (#3636)
This commit is contained in:
parent
c2cef877f4
commit
eed45793b9
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user