Added a response timeout to prevent connections from hanging.
Merge pull request #16 from Xeoncross/master

Prevent connections from hanging (pull request from @Xeoncross)