Skip to content

Commit

Permalink
fix: remove timeout and convert payload to bytes properly
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusc93 committed Dec 12, 2024
1 parent 806b9ca commit 6e29389
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions extensions/warp-ipfs/src/shuttle/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,6 @@ impl ShuttleTask {

let document: IdentityDocument = match ipfs
.get_dag(path)
.timeout(Duration::from_secs(10))
.deserialized()
.await
{
Expand Down Expand Up @@ -500,7 +499,7 @@ impl ShuttleTask {
.build()
.expect("Valid payload construction");

let bytes = serde_json::to_vec(&payload).expect("Valid serialization");
let bytes = payload.to_bytes().expect("valid deserialization");

_ = ipfs.pubsub_publish("/identity/announce/v0", bytes).await;

Expand Down Expand Up @@ -779,7 +778,6 @@ impl ShuttleTask {

let document: IdentityDocument = match ipfs
.get_dag(path)
.timeout(Duration::from_secs(10))
.deserialized()
.await
{
Expand Down Expand Up @@ -807,7 +805,7 @@ impl ShuttleTask {
.build()
.expect("Valid payload construction");

let bytes = serde_json::to_vec(&payload).expect("Valid serialization");
let bytes = payload.to_bytes().expect("valid deserialization");

_ = ipfs.pubsub_publish("/identity/announce/v0", bytes).await;
}
Expand Down

0 comments on commit 6e29389

Please sign in to comment.