Listen to disconnect event as well as exit
Merge pull request #4 from nick/patch-1

Listen to disconnect event as well as exit