fixes massive go routine/memory leak, data race and early exit for timeout == 0
Merge pull request #13 from mb0/master

massive go routine/memory leak, data race and early exit for timeout == 0

Excellent work. Thank you for the issues and the PR!