fix #233 add timeout for interactive messages
Merge pull request #247 from huafengw/timeout

fix #233 Add timeout for interactive messages