fix reopening bug
Merge pull request #34 from collectrium/fix-socket-reopening-bug

fix reopening bug