Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

dm-worker: fix panic in query status (#274) #275

Merged
merged 1 commit into from
Sep 9, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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