fix cancelTimer bug reported by Andri Redko.
now cancel timer when connection is closed
make sure timer is cancelled if there is an exception in execute
Merge pull request #30 from davecramer/master

Fix cancel timer bug reported by Andriy Redko