Unref() object when connection is closed
Merge pull request #47 from Nibbler999/unref

Unref() object when connection is closed