Skip to content

Commit d789988

Browse files
committed
fixup! Pass HRNResolver or DomainResolver into OnionMessenger
1 parent 9b9c21a commit d789988

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

src/builder.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1564,10 +1564,8 @@ fn build_with_store_internal(
15641564

15651565
let should_act_as_service = if hrn_config.disable_hrn_resolution_service {
15661566
false
1567-
} else if may_announce_channel(&config).is_ok() {
1568-
true
15691567
} else {
1570-
false
1568+
may_announce_channel(&config).is_ok()
15711569
};
15721570

15731571
if should_act_as_service {
@@ -1580,7 +1578,7 @@ fn build_with_store_internal(
15801578
Arc::new(OMDomainResolver::with_runtime(
15811579
service_dns_addr,
15821580
Some(client_resolver),
1583-
Some(tokio::runtime::Handle::current()),
1581+
Some(runtime.handle().clone()),
15841582
))
15851583
} else {
15861584
log_error!(logger, "To act as an HRN resolution service, the DNS resolver must be configured to use a DNS server.");

src/runtime.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ impl Runtime {
208208
);
209209
}
210210

211-
fn handle(&self) -> &tokio::runtime::Handle {
211+
pub(crate) fn handle(&self) -> &tokio::runtime::Handle {
212212
match &self.mode {
213213
RuntimeMode::Owned(rt) => rt.handle(),
214214
RuntimeMode::Handle(handle) => handle,

0 commit comments

Comments
 (0)