Skip to content

Commit

Permalink
dm-worker: fix panic in query status (pingcap#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
amyangfei authored Sep 9, 2019
1 parent 6112114 commit 2c262b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dm/worker/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (w *Worker) Status(stName string) []*pb.SubTaskStatus {
if cu != nil {
stStatus.Unit = cu.Type()
// oneof status
us := st.Status()
us := cu.Status()
switch stStatus.Unit {
case pb.UnitType_Check:
stStatus.Status = &pb.SubTaskStatus_Check{Check: us.(*pb.CheckStatus)}
Expand Down Expand Up @@ -161,7 +161,7 @@ func (w *Worker) Error(stName string) []*pb.SubTaskError {
}

// oneof error
us := st.Error()
us := cu.Error()
switch cu.Type() {
case pb.UnitType_Check:
stError.Error = &pb.SubTaskError_Check{Check: us.(*pb.CheckError)}
Expand Down

0 comments on commit 2c262b8

Please sign in to comment.