Closed artemave closed 6 years ago
Why would you want to use 0 as timeout?
We use smtp-server in tests as a simulator. We want it to shut down asap between tests so that tests don't get slow.
Due to how timers in JavaScript work you would not get any noticeable performance gain when using 0 instead of 1.
The problem is not that 1
is greater than 0
, it's that when you want to disable timeout and you'd set it to 0
, it would turn out to be 300
. That is a bug.
Because it evaluates to
false
here: