Change heartbeat timeout code
Merge pull request #41 from cowboy129/master

Change heartbeat timeout code