Skip to content

Commit

Permalink
Merge pull request #6065 from hashicorp/b-nil-driver-exec
Browse files Browse the repository at this point in the history
Check if driver handle is nil before execing
  • Loading branch information
Mahmood Ali committed Aug 2, 2019
2 parents 9ef22a4 + 488cd7e commit 2e0d67c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client/allocrunner/taskrunner/task_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,12 @@ func appendTaskEvent(state *structs.TaskState, event *structs.TaskEvent, capacit
}

func (tr *TaskRunner) TaskExecHandler() drivermanager.TaskExecHandler {
return tr.getDriverHandle().ExecStreaming
// Check it is running
handle := tr.getDriverHandle()
if handle == nil {
return nil
}
return handle.ExecStreaming
}

func (tr *TaskRunner) DriverCapabilities() (*drivers.Capabilities, error) {
Expand Down

0 comments on commit 2e0d67c

Please sign in to comment.