Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion command.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func (c *Command) slurpAllOutput() (bool, error) {
response, err := c.client.sendRequest(request)
if err != nil {
var errWithTimeout *url.Error
if errors.As(err, &errWithTimeout) && errWithTimeout.Timeout() {
if !c.client.AllowTimeout && errors.As(err, &errWithTimeout) && errWithTimeout.Timeout() {
// Operation timeout because the server didn't respond in time
return false, err
}
Expand Down
1 change: 1 addition & 0 deletions parameters.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ type Parameters struct {
Timeout string
Locale string
EnvelopeSize int
AllowTimeout bool // Allow Commands to finish if connection times out. Useful if the command causes the Host to shut down.
TransportDecorator func() Transporter
Dial func(network, addr string) (net.Conn, error)
}
Expand Down