Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 24 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/api/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl LocalServer {

pub async fn run(self, shutdown: &triggered::Listener) -> Result {
let listen_addr = self.listen_addr;
tracing::Span::current().record("listen", &listen_addr.to_string());
tracing::Span::current().record("listen", listen_addr.to_string());
info!(listen = %listen_addr, "starting");
TransportServer::builder()
.add_service(Server::new(self))
Expand Down
12 changes: 1 addition & 11 deletions src/base64.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
use base64::{
engine::general_purpose::{STANDARD, URL_SAFE_NO_PAD},
Engine,
};
use base64::{engine::general_purpose::STANDARD, Engine};

pub trait Base64 {
fn to_b64url(&self) -> String
where
Self: AsRef<[u8]>,
{
URL_SAFE_NO_PAD.encode(self.as_ref())
}

fn to_b64(&self) -> String
where
Self: AsRef<[u8]>,
Expand Down
5 changes: 3 additions & 2 deletions src/beaconer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ use futures::TryFutureExt;
use helium_proto::services::poc_lora::{self, lora_stream_response_v1};
use http::Uri;
use std::sync::Arc;
use time::{Duration, Instant, OffsetDateTime};
use std::time::Instant;
use time::{Duration, OffsetDateTime};
use tracing::{info, warn};

/// Message types that can be sent to `Beaconer`'s inbox.
Expand Down Expand Up @@ -106,7 +107,7 @@ impl Beaconer {
info!("shutting down");
return Ok(())
},
_ = tokio::time::sleep_until(next_beacon_instant.into_inner().into()) => {
_ = tokio::time::sleep_until(next_beacon_instant.into()) => {
// Check if beaconing is enabled and we have valid region params
if !self.disabled && self.region_params.check_valid().is_ok() {
self.handle_beacon_tick().await;
Expand Down