allow server to disconnect safely
Merge pull request #5 from karlcoelho/feature

allow server to disconnect safely