Clean timeout handling code
Merge pull request #1 from jvazquez-r7/review_3238

Clean timeout handling code