kof/connect-debounce — pull request #5 by hannesgassert (2013-12-23 20:50:07+00:00)
Title: Closes #1 with additional sanity check

Notes:

* Root cause: under heavy load, debounced requests can come in faster than the session store's roundtrip time.
* Example: two requests, debounced with immediate=true and a waiting time of coming in `x` ms apart. When the session store takes longer to read/write than `x`, `connect-debounce` crashed.
* Bug was not detected in tests because tests were using an idealised session store that had zero roundtrip times.
* Pull request contains #4, merge that first.
* It might make sense to make the tests more realistic by using e.g randomised roundtrip times to the session store.