Skip to content

Commit

Permalink
fix: driver down state
Browse files Browse the repository at this point in the history
  • Loading branch information
wwhai committed Nov 8, 2022
1 parent 9866ac6 commit afad61f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion engine/load_device.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ func checkDeviceDriverState(abstractDevice typex.XDevice) {
if abstractDevice.Status() == typex.DEV_UP {
// 必须资源启动, 驱动才有重启意义
if abstractDevice.Driver().State() == typex.DRIVER_DOWN {
glogger.GLogger.Warn("Driver stopped:", abstractDevice.Driver().DriverDetail().Name)
glogger.GLogger.Warn("Driver down:", abstractDevice.Driver().DriverDetail().Name)
// 只需要把资源给拉闸, 就会触发重启
abstractDevice.Stop()
}
Expand Down
4 changes: 2 additions & 2 deletions engine/load_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ func checkSourceDriverState(source typex.XSource) {
// 只有资源启动状态才拉起驱动
if source.Status() == typex.SOURCE_UP {
// 必须资源启动, 驱动才有重启意义
if source.Driver().State() == typex.DRIVER_STOP {
glogger.GLogger.Warn("Driver stopped:", source.Driver().DriverDetail().Name)
if source.Driver().State() == typex.DRIVER_DOWN {
glogger.GLogger.Warn("Driver down:", source.Driver().DriverDetail().Name)
// 只需要把资源给拉闸, 就会触发重启
source.Stop()
}
Expand Down

0 comments on commit afad61f

Please sign in to comment.