mirror of
https://github.com/kemko/nomad.git
synced 2026-01-08 11:25:41 +03:00
Merge pull request #6065 from hashicorp/b-nil-driver-exec
Check if driver handle is nil before execing
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user