Removed the unused check_close_connection method.