Fix timeout race conditions
Unit test for timeout race
Merge pull request #256 from benjchristensen/timeout-race-condition

Fix Race Condition on Timeout