Skip to content

Commit

Permalink
more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
raffaeleragni committed Dec 30, 2023
1 parent 5d3f3aa commit 90d8663
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/networking/assets/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ impl SyncAssetTransfer {
};
result.server_pool.execute(move || {
for request in server.incoming_requests() {
debug!("Queuing response");
debug!("Queuing response to {}", request.url());
server_tx.send(request).unwrap_or(());
}
});
Expand All @@ -94,7 +94,7 @@ impl SyncAssetTransfer {
}
}
let meshes_to_apply = self.meshes_to_apply.clone();
debug!("Queuing request");
debug!("Queuing request for {:?}:{} at {}", asset_type, id, url);
self.download_pool.execute(move || {
if let Ok(response) = ureq::get(url.as_str()).call() {
let len = response
Expand Down Expand Up @@ -149,14 +149,14 @@ impl SyncAssetTransfer {
fn respond(rx: Receiver<Request>, meshes: MeshCache) {
for request in rx.iter() {
let url = request.url();
debug!("Responding to {}", url);
let Some(id) = url.strip_prefix("/mesh/") else {
continue;
};
let Ok(id) = Uuid::parse_str(id) else {
continue;
};

debug!("Responding to {}", url);
let Ok(meshesmap) = meshes.read() else {
request
.respond(Response::from_string("").with_status_code(449))
Expand Down
1 change: 1 addition & 0 deletions src/proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use serde::{Deserialize, Serialize};
pub type EntityId = Entity;
pub type AssId = Uuid;

#[derive(Debug)]
pub(crate) enum SyncAssetType {
Mesh,
}
Expand Down

0 comments on commit 90d8663

Please sign in to comment.