Added disconnect check
Merge branch 'master' of https://github.com/DSMNET/DSMNET