Adding re-connection support, but requires much more tests