Fix MotorSafety deadlock (#1526)

Some instances of StopMotor (most notably DifferentialDrive) call Feed(),
which deadlocks due to Check() holding the same lock.

Fixes #1525.
This commit is contained in:
Peter Johnson
2019-01-02 20:58:39 -08:00
committed by GitHub
parent 6bdd7ce506
commit bc2c932f92

View File

@@ -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);