Parakeet is a Rust-based Bluesky AppView aiming to implement most of the functionality required to support the Bluesky client

fix(did-resolver): speed increases to handle resolution

Changed files
+7 -5
did-resolver
+1
Cargo.lock
··· 942 942 "serde", 943 943 "serde_json", 944 944 "thiserror 2.0.11", 945 + "tokio", 945 946 ] 946 947 947 948 [[package]]
+2 -1
did-resolver/Cargo.toml
··· 8 8 reqwest = { version = "0.12.12", features = ["json", "native-tls"] } 9 9 serde = { version = "1.0.217", features = ["derive"] } 10 10 serde_json = "1.0.134" 11 - thiserror = "2.0.11" 11 + thiserror = "2.0.11" 12 + tokio = { version = "1.42", features = ["macros"] }
+4 -4
did-resolver/src/lib.rs
··· 112 112 113 113 pub async fn resolve_handle(&self, handle: &str) -> Result<Option<String>, Error> { 114 114 // we want one of these to succeed 115 - let http = self.resolve_handle_http(handle).await; 116 - let dns = self.resolve_handle_dns(handle).await; 115 + let http = self.resolve_handle_http(handle); 116 + let dns = self.resolve_handle_dns(handle); 117 117 118 - match (http, dns) { 118 + match tokio::join!(http, dns) { 119 119 (Ok(http), Ok(dns)) => Ok(dns.or(http)), 120 120 (http, dns) => http.or(dns), 121 121 } ··· 135 135 } 136 136 137 137 async fn resolve_handle_dns(&self, handle: &str) -> Result<Option<String>, Error> { 138 - let res = match self.dns.txt_lookup(format!("_atproto.{handle}")).await { 138 + let res = match self.dns.txt_lookup(format!("_atproto.{handle}.")).await { 139 139 Ok(txt) => txt, 140 140 Err(err) => { 141 141 return match err.kind() {