Merge pull request #6065 from hashicorp/b-nil-driver-exec

Check if driver handle is nil before execing
This commit is contained in:
Mahmood Ali
2019-08-02 09:48:28 -05:00
committed by GitHub

View File

@@ -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) {