Detect SIGTERM in order to close the connection when shutting down
Minor changes in comments
Merge pull request #2 from aseques