Skip to content

Commit

Permalink
Fix MotorSafety deadlock (#1526)
Browse files Browse the repository at this point in the history
Some instances of StopMotor (most notably DifferentialDrive) call Feed(),
which deadlocks due to Check() holding the same lock.

Fixes #1525.
  • Loading branch information
PeterJohnson authored Jan 3, 2019
1 parent 6bdd7ce commit bc2c932
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion wpilibc/src/main/native/cpp/MotorSafety.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ void MotorSafety::Check() {
return;
}

std::lock_guard<wpi::mutex> lock(m_thisMutex);
if (stopTime < Timer::GetFPGATimestamp()) {
wpi::SmallString<128> buf;
wpi::raw_svector_ostream desc(buf);
Expand Down

0 comments on commit bc2c932

Please sign in to comment.