copy default params

This commit is contained in:
Matthew Hooker 2016-10-05 16:43:38 -07:00
parent 9b0fdc7509
commit 7db6e8ec38
1 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ func New(config *Config) (*Communicator, error) {
}
// Create the client
params := winrm.DefaultParameters
params := *winrm.DefaultParameters
if config.TransportDecorator != nil {
params.TransportDecorator = config.TransportDecorator
@ -44,7 +44,7 @@ func New(config *Config) (*Communicator, error) {
params.Timeout = formatDuration(config.Timeout)
client, err := winrm.NewClientWithParameters(
endpoint, config.Username, config.Password, params)
endpoint, config.Username, config.Password, &params)
if err != nil {
return nil, err
}