You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But the code don't work anymore as expected. The timer freeze the data event during 5000ms, unless I "deref" the timer object. Can someone explain this behavior ?
Ps: I'm using Linux Arch, node 11.5.0, latest serial port.
The text was updated successfully, but these errors were encountered:
Hi,
I'm trying to use a timer to evaluate if the device i'm using is still responding, with a code like that:
[...]
serial.write(request);
dead_timer = setTimeout(() => { set device is dead }, 5000);
[...]
serial.on('data', response => {
clearTimeout(dead_timer);
[...]
})
But the code don't work anymore as expected. The timer freeze the data event during 5000ms, unless I "deref" the timer object. Can someone explain this behavior ?
Ps: I'm using Linux Arch, node 11.5.0, latest serial port.
The text was updated successfully, but these errors were encountered: