close connections properly
Merge pull request #139 from harpreet-sawhney/master

close connections properly
Merge remote-tracking branch 'upstream/master' into closing_connections