Merge "Fix StatefulConnection to not to fail on exit"