Fix re-open() of connection

- Added related test case