Clear any previous closed event
Merge pull request #86 from MMcM/reset-closed-sockets

Clear closed flag when opening connection