Fixes interrupts not getting closed properly. (#1088)

The threads being created were never getting cleaned up.
This commit is contained in:
Thad House
2018-05-24 17:02:13 -07:00
committed by Peter Johnson
parent 62d5301b1f
commit 381c25c573
4 changed files with 43 additions and 17 deletions

View File

@@ -156,7 +156,11 @@ Java_edu_wpi_first_wpilibj_hal_InterruptJNI_cleanInterrupts
<< "Interrupt Handle = " << (HAL_InterruptHandle)interruptHandle;
int32_t status = 0;
HAL_CleanInterrupts((HAL_InterruptHandle)interruptHandle, &status);
auto param =
HAL_CleanInterrupts((HAL_InterruptHandle)interruptHandle, &status);
if (param) {
delete static_cast<InterruptJNI*>(param);
}
INTERRUPTJNI_LOG(logDEBUG) << "Status = " << status;