+
+ name_is_owned = true;
+
+ // Now that we know that we own the name, it's safe to show the UI.
+ if (show_requested) {
+ show();
+ show_requested = false;
+ }
+ shown = true;
+ },
+
+ // Name lost callback:
+ (conn, name) => {
+
+ // This callback usually means that another moonshot is already running.
+ // But it *might* mean that we lost the name for some other reason
+ // (though it's unclear to me yet what those reasons are.)
+ // Clearing these flags seems like a good idea for that case. -- dbreslau
+ name_is_owned = false;
+ show_requested = false;
+