should be resetting the connection struct when connection is failed to make