Fix deadlock in disconnect()
Merge pull request #99 from mgehre/deadlock

Fix deadlock in disconnect()